SQL Mail

  • I am having a problem were sql mail will work once but then fail after that until I reboot the server.  I am using a SQL Server 2000 and Outlook 2000, with Internet E – Mail and SMTP / POP3 setup.  I installed Outlook while logged in under the same account that the SQLSERVER and AGENT services are started with. It is a local system account with admin rights on the server and in sql.  When I reboot the server I can go into EM and TEST the Mail Profile in Support Services and in the Properties of SQL Agent successfully. Then I can run an xp_sendmail procedure and it returns: SQL Mail session started. Mail Sent and I receive an email.  If I run xp_sendmail again all I get is Mail Sent, no email is delivered and if I go back into EM and try to click TEST for the Mail Profile in either area EM locks up and needs to be killed in Task Manager.  I have tried stopping and restarting the Agent service but it doesn’t help and won’t work again until I reboot the server.  When the server is rebooted the unsuccessful mail is usually delivered. I have uninstalled and reinstalled Outlook several times and tried two different servers with the same problems. I tried xp_startmail > xp_sendmail > xp_stopmail and the first time after a reboot it works but on the second try it locks up QA and I have to kill it with Task Manager. I have tried leaving Outlook open while running the xp_sendmail procedure without any luck, it hangs also. Any suggestions would be greatly appreciated.

  • I've found xp_sendmail and the SQL Mail agent at best inconcistent and not very reliable. Instead I've used vbscript and CDONTS or java and the javaMail API. Either one is easy to use and you can write elaborate mail routines that you can then call from a SQL Job.

     

    dab

  • Doug,

    Do you have some examples you would care to share?

    Sue

Viewing 3 posts - 1 through 2 (of 2 total)

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