Starting SQL Mail client session error

  • Hi,

     

    I have a problem with SQL Mail. I ask for help, if somebody knows what below described error means and if somebody knows solution for it.

     

    I have installed two instances of SQL Server: default and one named. Default instance is stopped, named is running. SQL Server service and Agent Service of this named instance are started with the domain\Administrator user account. Under the same user account I have created mail profile with Microsoft Outlook

     

    I have installed SQL 2000 with SP3a, Windows Server 2000 and Outlook 2003. I have installed SQL Reporting Server with SP1 also.

     

    Now if I in QA run:

    exec xp_stopmail

    I get

    Stopped SQL Mail session.

     

    This is OK. Then I want to start Mail Session with

    exec xp_startmail

    and I get this message

    SQL Mail session started.

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

    xp_startmail: failed with mail error 0x8004011d

     

    What this error mean?

     

    I also get error when I want to send mail with

    exec xp_sendmail 'name@domain', 'test'

          

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

    xp_sendmail: failed with mail error 0x80004005

    This error is probably consequence of unsuccessfully started SQL Mail client session

     

    Thanks for any suggestion.

  • I and several others experienced the same. Although I couldn't find any official statement from Microsoft, it seems that SQL2K can not work together with Outlook 2003. Try Outlook 2002 and it should work.

    M

    [font="Verdana"]Markus Bohse[/font]

  • Thank you for your solution. I installed Outlok 2002 and now it works.

  • Just a simple question:

    1. Have you started SQL Server Agent before stopping the Mail Services?

    2. Can you check the SQL ServerAgent Error Log messages when SQL Agent has started ?

     

  • Yes, I have started SQL Server Agent before I have stopped and started Mail Services.

    I have checked  the SQL ServerAgent Error Log, also. There aren't any errors.

    Messages in this log about Mail Services are:

    Using MAPI32.DLL from C:\WINNEW\SYSTEM32 (version 1.0.2536.0)

    Attempting to start mail session using profile 'DELL'...

    Mail session started (using MAPI1) 

  • Hi, there

    I also experinced the same problem recently. A kind of funny. I have 2 database server, the first one for production and the other one for testing. Both installed Win 2003 SP1, SQL Server 2000 SP4 and M$ Outlook 2003 as a MAPI client.

    When I tried to execute xp_sendmail from production, it runs smoothly. But when I execute from testing, I had the following error

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

    xp_sendmail: failed with mail error 0x80004005

    Both execution run from Query Analyzer. Any idea?

  • I am getting the same error on many of my servers.  I could not develop any patterns.  Outlook 2003 would work on some servers and not on others with the same setup.  The same result happened with Outlook 2002. 

     

    I would suggest switching to xp_smtp_sendmail.  You can what you need here.  http://www.sqldev.net/xp/xpsmtp.htm  It worked for me.

     

    Good luck.

  • I'm having the same problem on quite a few servers too--some use Outlook client 2000, 2002, or 2003.  We upgraded one of the Exchange servers to Exchange 2003 and started using Active Directory about the same time, and have been having issues ever since.  We also joined our domain to another which has the same NT account that we use for the startup accounts for the SQL Servers, and the Server Admins think the issue is with the Active Directory, NT account, and the mailbox.  Can't recall if they are seeing errors in Active Directory or Exchange but they said that it is because of the "ambiguous" name on the network.  I haven't seen anywhere in Outlook 2003 where you can put the full email address instead of using the NT name, but we're still looking into it.  Will let you know if we find anything helpful.

  • I have been experiencing this problem since the weekend (thought it was due to leapyear - 29 days in Feb).

    I resolved it by;

    1) Stopping the mail service from Query Analyser (exec xp_stopmail).

    2) Stopping the SQL Server agent process.

    3) Starting the SQL Server agent process.

    4) Starting the mail service from Query Analyser (exec xp_startmail).

    Just send yourself a test email by EXEC xp_sendmail @recipients='yourname@domain.co.uk', @subject='Test'

  • I've also tried to avoid the use of Outlook on a production box.

    How to send e-mail without using SQL Mail in SQL Serverhttp://support.microsoft.com/kb/312839/

    Regards Ramon

  • I was also facing same problem... Thanks to all for such a given Good answers.

    Thanks alot.

    Amit

  • I was getting the same problem at customer's enviroment and after some tests at my lab. The SQL Server 2000 SP4 works fine with Outlook 2000, 2002 and also 2003. When you configure the sql server account at outlook, you need to ensure that:

    - You're creating the mail profile with the sqlserver service account.

    - The outlook is closed at the start sqlmail.

    - The outlook account has been configured with the checkbox "Remember Password" checked.

    - The mail profile has been configured at SQL Server Agent properties.

    After these steps, probably your sqlmail at sql 2000 will work.:-D

    See u friends!

    Tafarelo

  • Are you really sure you want and need to have outlook installed on a server?

    With CDOSYS and a couple of stored procedures you can perform the same job.

    Regards

    Regards Ramon

  • Hello Ramon!

    I could have to try CDOSYS, but in my case the customer already has the enviroment with the outlook and other particularities. But, you're right, maybe not safe has the outlook installed on server.

  • Hi Tafarelo,

    I do not feel comfortable with Outlook installed and configured on server, so I guess I've tried to convince the customer.

    I know that some customers does not let to be convinced until is late but that's another question.

    Regards Ramon

Viewing 15 posts - 1 through 14 (of 14 total)

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