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.
07Sep

5 Comments for xp_sendmail: failed with mail error 0x80004005

  1. Bob Coppedge says:
    Thanks for the tip. Worked like a charm.
  2. SQL User says:
    It works...
  3. Ben Joyce says:
    Brilliant! This has bugged me on and off for years... works perfectly. Thanks.
  4. Grandmere says:
    Good job son!
  5. Dave Bernero says:
    Works Great!!! Thanks!!

Leave a Reply