xp_sendmail: failed with mail error 0x80004005

Ever get this error with MS SQL2000?

xp_sendmail: failed with mail error 0x80004005

Microsoft would have you doing all sorts of shenanigans with Active Directory.

In my case, xp_sendmail would work fine from one server, but not another. They both used the same AD account, so that didn't seem too logical of a fix.

Restarting SQL Server Agent service didn't help. Simply running these 2 stored procedures fixed it:

EXEC xp_stopmail
EXEC xp_startmail

All I can figure is that there was a communication breakdown between my SQL server and Exchange and SQL doesn't recover very gracefully from that.


Comments (Comment Moderation is enabled. Your comment will not appear until approved.)

[Add Comment]

Thanks for the tip. Worked like a charm.
# Posted By Bob Coppedge | 9/10/08 10:45 AM
It works...
# Posted By SQL User | 10/3/08 4:31 PM
Brilliant!

This has bugged me on and off for years... works perfectly.

Thanks.
# Posted By Ben Joyce | 3/30/09 11:03 AM
Good job son!
# Posted By Grandmere | 5/19/09 9:07 PM

[Add Comment]