March 30, 2006 at 7:14 am
I use sp_send_dbmail inside a trigger to notify certain users about data modifications. This works perfectly fine in several places.
I also use sp_send_dbmail inside a SP which imports data daily and uses sp_send_dbmail to notify me of how many bad items were imported. When I get this notification e-mail, I receive it twice.
Anybody know why sp_send_dbmail would send duplicate messages in one instance and not the other?
BTW - The emails are sent with the same exact timestamp.
Thanks - Wayne
March 31, 2006 at 9:19 am
I have seen instances where dbmail seems to send duplicate messages as well. I have not had time to investigate it. I don't even know if there are any patterns to it. In our case it's fired from an sp.
If you have thoughts of switching to xp_sendmail to avoid this issue, be sure not to do so in the trigger. xp_sendmail sends the mail in-process, so I believe your data modification would wait to finish until the mail sends (which can take several seconds). Plus xp_sendmail in 2005 requires Outlook 2002 or better or some similar MAPI client, I believe.
March 31, 2006 at 11:59 am
I have tried xp_sendmail, and cannot use it since we do NOT have Outlook installed on the server.
I'll keep looking. Thanks for the input.
May 25, 2011 at 9:20 am
If one of the @recipients is unreachable and your Sp_send_dbmail system parameters is set to retry 1 more time ( default) then those that got email before will get it again about a minute apart one more time. you can change your system parameters to 0 retries thus those that are reachable will receive the email and those that can't will not.
June 14, 2011 at 8:19 am
I've just started having this problem with some long running jobs. One job is an alert I set up for myself & I am the only recipient. It only happens periodically, and there doesn't seem to be a pattern.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply