Database Mail
-
Monday, May 28, 2012 11:09 AMHi All.
Can Someone Help Me Out.
I Have A
Stored Procedure that calls msdb.dbo.[sp_send_dbmail] and sends
mails.
Sometimes the mail fails and not delivered to the
recipients.
I Know that the Mail Details Get Stored in
[msdb].[dbo].[sysmail_mailitems] with sent_status = 2.
Is there any way
to send failed mails in SQL like a built in job.
I don't want to again use
msdb.dbo.[sp_send_dbmail] stored procedure.
Because if it fails again, then
one more entry will be added to [msdb].[dbo].[sysmail_mailitems], which I don't
want.
All Replies
-
Monday, May 28, 2012 2:42 PM
This is a Database Mail configuration setting.
To set this, you can use the sysmail_configure_sp stored procedure to onfigure DB Mail.
http://msdn.microsoft.com/en-us/library/ms186321.aspx
The two values that you need to set are: AccountRetryAttempts and AccountRetryDelay
You can also use SSMS, select (yourservername)/Management/Database Mail. Rigth click and choose "Configure Database Mail", perhaps click through the informational dialog and choose "View or change system parameters".
RLF
- Proposed As Answer by Eshani Rao Monday, May 28, 2012 11:30 PM
- Marked As Answer by Peja TaoModerator Friday, June 01, 2012 9:06 AM

