Questions tagged [database-mail]
Database Mail is an enterprise solution for sending e-mail messages from the SQL Server Database Engine. Using Database Mail, your database applications can send e-mail messages to users. The messages can contain query results, and files from any resource on your network. Database Mail is designed for reliability, scalability, security, and supportability.
189 questions
1
vote
1
answer
50
views
Database Mail, parse error when adding query with @query
I have the task of getting the free space in the database each month, and emailing the results using Database mail.
Database Mail is setup and working.
I have a query (copied from Greg Robidoux) that ...
0
votes
0
answers
145
views
SQL Server 2022 Contained AGs and database mail
I have two SQL Server 2022 environments with Contained AG configured with a listener that the users are connecting too. All three have db mail configured identically. The two servers are able to ...
0
votes
0
answers
195
views
sp_send_dbmail not working but send test e-mail for database mail working
I set up database mail on a SQL Server.
When I send a test e-mail form SSMS it works.
When I try to send an email using msdb.dbo.sp_send_dbmail via the query window I get:
Mail (Id: xx) queued. but ...
0
votes
0
answers
157
views
Database Mail Unsent
We had to rebuild our SQL server instance over this week and have restored every database including Master and other system settings, but our database mail does not seem to be working.
All of the ...
0
votes
0
answers
233
views
In SQL Server database mail is not working
Database mail is not working:
Below Error while sending a test mail
Mail not queued. Database Mail is stopped. Use sysmail_start_sp to start Database Mail. (Microsoft SQL Server, Error: 14641)
Checked ...
1
vote
2
answers
159
views
Prevent users from sending an email attachment in sql server
In SQL Server, I want to restrict all users (except a few specific users) to send an email with attachment.
For example, someone import data into excel file and send it via mail using the ...
0
votes
2
answers
129
views
What to consider for choice of database account email - prevent 'out of office' reply problems
Here's the problem we are having: I have Job Notifications turned on for several SQL Server nightly Jobs. Sometimes those email notifications come to me when I'm out of office, and my Outlook is set ...
0
votes
0
answers
61
views
Deleted SQL Agent Job Sending Failed Notifications
I have deleted the job and I don't see it in the object explorer nor in sysjobs, and yet it is sending out notifications when it 'fails'. I've done the following solution:
Restart MSSQLSERVER & ...
0
votes
0
answers
2k
views
How to use multiple email profile in SQL Server agent jobs?
The SQL Server alert system configuration page (see below image) allows me to choose only a single mail profile. Does that mean I can only use a single email address to send notifications in my SQL ...
0
votes
0
answers
1k
views
Transaction aborted when accessing versioned row in table 'dbo.sysmail_profile' in database 'msdb'
I'm having some problens with SQL Database mail, basicaly anything that I try to do gives me an error like this one below:
Transaction aborted when accessing versioned row in table 'dbo....
0
votes
1
answer
675
views
Failed to initialize sqlcmd library with error number -2147467259
This is my code:
SET @msg = 'Customer Voice replies.';
SET @query=
'SELECT [column1],[column2] FROM [StagingMX].[dbo].[_CVA]
WHERE DATEDIFF(day, [Completion time] ,GETDATE()) = 1
AND [...
2
votes
0
answers
955
views
SQL Server DBMail post 1 October 2022 with Oauth 2.0 requirements
I cannot get a straight answer from anyone on whether or not SQL Server mail will continue to work after 1 Oct with OAUTH 2.0 implementation by Microsoft. From what I understand basic authentication ...
0
votes
1
answer
1k
views
How to make SQL Server Database Mail use "PLAIN" authentication (instead of "LOGIN" authentication)?
I'm having issues sending Database Mail with "PLAIN" authentication on two different versions MSSQL Server.
SQL Server 2012
SQL Server 2019
Context
I have created backup jobs which ...
0
votes
2
answers
1k
views
Which TLS version is database mail using?
How can we find out which TLS version our database mail is using for sending e-mails?
We have issues with database mail (mails are sometimes not sent, even after 10 repeats), and it seems that TLS 1.1 ...
1
vote
1
answer
4k
views
SQL Server 2016 O365 SMTP "Failure sending mail" intermittently?
We have had a recurring problem since about October, where our emails through our SQL 2016 database will intermittently fail throwing this error through SQL Server Mail:
Message The mail could not be ...