SQL Mail with Outlook 2003

  • exec master.dbo.xp_startmail 'Profile2'

    exec master.dbo.xp_sendmail @recipients='abc@dream.com', @subject='Test 2', @message='Hello 2'

    exec master.dbo.xp_stopmail

    I execute the above code in Query analyzer. It says mail sent.

    But Microsoft Outlook 2003 does not forward/send that mail. It gives error message "This message has not been sent". On the other hand, Outlook sends and recievs emails if I type those emails in Outlook. In other words, it works fine on its own but does not send emails originated from SQL Server agent.

    I guess there is something in Outlook to be checked or configured etc but i'm aware of that yet.

    Any help would be apprecitated.

  • But you see the SQL Server message in Outlook? Is Outlook 2003 set to Cached Exchange Mode?

    K. Brian Kelley
    @kbriankelley

  • Did you install Outlook with the Custom installation CDO option?

    Did you create the profile while logged in as the service account?

    Outlook profiles are stored in the user's profile (C:\Documents and Settings\<user name>\..., so just creating the profile is not enough, it must be created in the outlook profile of the MSSQLSERVER service account profile for your code to work. This is also true for the SQLSERVERAGENT service account.

    I generally cheat and create the exact same profile name and configuration for my normal login on the SQL Server, otherwise the combo box list is always empty when using EM UI on SQL Server.

    Remember to change all outlook profiles on the SQL Server when a configuration needs changing.

    Andy

  • Messages stay in in the inbox after being sent my sql server agent.

    Every message has error message "This message has not been sent."

    Well, Outlook 2003 is not cached Exchange mode because i'm not using Exchange Server.

    Rather, i'm using Internet mail (SMTP/POP3).

    Thanks

     

  • David

    I installed Microsoft Office 2003 custom installation because i needed only Outlook.

    I created the profile when i was logged as an administrator.

    I'm not clear when you say "so just creating the profile is not enough, it must be created in the outlook profile of the MSSQLSERVER service account profile for your code to work".

    Please explain. Thanks

     

Viewing 5 posts - 1 through 5 (of 5 total)

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