none
SQL Mail (“xp_sendmail: failed with mail error 0x80040111”.)

    問題

  •  

    Hi,

     

    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.

     

    Thanks

    Kishan

     

     

    2007年11月14日 下午 12:03

所有回覆

  • Hi,

     

    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

     

    Any ideas?

     

    Thanks

     

    Ref:

    EXEC dbo.xp_sendmail '*********.com' ,

    @message = ' Testing mail service please ignore!'

    2008年1月31日 上午 10:08
  • Is the Outlook profile that you created for the domain user account that the SQL Server Agent runs as? Can you log onto Windows Server as that domain user and send email using that profile?

    Check out these links:
    http://support.microsoft.com/?id=263556
    http://support.microsoft.com/?id=315886


    HTH...

    Joe

    2008年2月1日 下午 01:59
    版主
  • 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.

    2010年9月29日 下午 03:43
  • did you try running xp_stopmail and then xp_startmail?


    Pradeep Adiga
    My blog: http://www.sqldbadiaries.com

    Recent posts on my blog
    2010年9月29日 下午 07:48
  • Hi,

    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 'xxxx@xx.com','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..... :)
    2010年10月1日 上午 05:17
  • Well if you think you have all setup correctly including exchange profile, SQL agent and server profile in sync then just stop the mail and start it back. using xp_stopmail and xp_startmail commands. It works.

    Regards,

    Sudarshan

    2011年1月7日 上午 11:58
  • I solved the same issue by installing SQL Server 2000 SP4 and Outlook 2003 as MAPI client (in cache mode).

    Regards,

    Marco

    2011年10月3日 下午 09:55
  • 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

    Thanks

    Sethu  Srinivasan  [MSFT]

    SQL Server

    http://blogs.msdn.com/sqlagent

    2012年8月14日 下午 09:23