XP_sendmail and mapi profile

  • Hi Everybody

    I hope there is somebody out there who can help me.  I am trying to setup notification on MS SQL Server 2000-8.00.760 (Intel x86).  Enterprise Edition on Windows NT5.0 (Build 2195:Serice PAck 4).

    I have setup a mail profile using Internet mail server (POP3/SMTP).  The client on the SQL server is Outlook 2000.  Our e-mail system is GroupWise and I am using the GWIA as the SMTP Gateway.  Using the mail pofile and a mail account I can send and receive mail. I have also ran a 'xp get mapi profiles' , which lists the two profiles on the server, BIMail (default) & Novell Default Settings.

    However when I try to send a mail using xP_send mail I get the following error message:

    "Server: Msg 18025, Level 16, State 1, Line 0

    xp_sendmail: failed with mail error 0x80004005"

    I have also tried to generate a mail and send to an operator, and that also fails.

    I would be greatfull if there is anybody who can help resolve this problem.  My knowledge of SQL Server 2000 is limited as I have been asked to resolve this because I do server support and I am not a DB expert.

    Thankyou

     

  • The SQLAgent service needs to be logged on as a user that can send email.  If the service is started under the LocalSystem account, then I would assume that it won't have permissions or access to the email client.

    Try changing the service to a different user, and see if that helps.

  • Hi

    Thankyou for your post Martincross.  Both the SQL Server and the SQL Server Agent are logged in using the same account on the domain.  I logged into the server using the same domain id and password, when I set the mapi profile.

    When I do a test from SQL Mail using BIMail profile I get the message "Succesfully started (& stopped) MAPI Session with this profile."

    When I do a test on BiMAil profil from a SQL Server Agent, I get "error 2022:SQL Server Agent error: MAPILogonEx Failed due to MAPI error 87: Invalid Parameter."

    Any further help would be greatly appreciatd.

    Thankyou

  • Hi, check the startup account in the SQL Server Agent properties dialog. Select "This account" and put here the same account info that you use in your MAPI profile, using the DOMAIN\account format. I had the same problem and this just solved it!

  • Hi

    I have finally managed to resolve this problem.  I am using the inernet e-mail option and sending the e-mail to an smtp gateway.  I then poll for mail in outlook every one minute.

    Thanks to everyonr for their input.

     

  • Visit http://sqldev.net/

    they have magic extended stored proc for sending e_mail via SMTP. No ugly MAPI which is VERY VERY not reliable service.

  • Hi Denis.  Thankyou for the link, I will check it out.

     

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply