I have sql server 2000 with sp2 on Win 2003 enterprise edition SP2 box and Outlook 2003 client. Whenever i execute Xp_sendmail procedure i get this error :-
xp_sendmail: failed with mail error 0x80040111
If we test the SQL mail through the entrprise manager the error is:-
Error:18025: Xp_test_mapi_profile: Failed with mail error: 0x80040111.
The outlook profile is configured fine , i am able to send mail through outlook from the same server.
My Sql server agent service uses the same account for startup.
Please let me know if any thing else need to be checked.
If its any consolation, we having the same error now having been able to execute xp_sendmail in the past. Jobs from SQL agent are still able to fire notification but if I try to execute from SP or trigger it return same error.
I have checked BOL but nothing concreate
EXECdbo.xp_sendmail '*********.com' ,
@message= ' Testing mail service please ignore!'
We're having exactly the same issue -- Windows 2003 with SQL Server 2000 SP2. We run under an account named "SqlService". I can log in and send mail all day with this account, but SQL Mail throws up the error above.
This was working before last Monday morning after the database server was rebooted for the first time in a couple months.
As per KB http://support.microsoft.com/kb/238119 Error Code: 0x80040111 means MAPI_E_LOGON_FAILED which means its Authentication issue. It seems SQL AGENT Mail was not able to talk to Exhange Server. Issue is not there on Exchange Part as you mentioned that you are able to send emails thry OUTLOOK. Now what I recommend is to follow below steps:
-> Log on tho the server using SQL Server domain account .
-> Log on to the server >> created a new profile >> Changed the SQL Agent setting to point to that profile (which was now visible..wow).
-> Started the mail session using xp_startmail.
SQL Mail session started.
-> Sent a test mail : xp_sendmail 'firstname.lastname@example.org','test'
We should get -> Mail sent message.
Please check this and update if it works.
Regards Gursethi Blog: http://ms-gursethi.blogspot.com/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++ Please mark "Propose As Answer" if my answer helped..... :)
xp_sendmail is deprecated http://msdn.microsoft.com/en-us/library/ms189505(v=sql.105).aspx
Instead, please use Database Mail http://msdn.microsoft.com/en-us/library/ms175887(v=sql.105).aspx
Sethu Srinivasan [MSFT]
- 已提議為解答 Sethu SrinivasanMicrosoft employee 2012年11月20日 下午 04:12