Hello everyone
I'm trying to send email from a stored procedure (SQL Server 2000) using the xp_sendmail procedure call. My code is:
I'm using Outlook 2003 as my email and is set up correctly.
Running this code works in that I get no error messages and the email appears in Outlook. However, the email is not automatically sent - it just sits in the Inbox awaiting a manual Send (at which point it sends correctly). I don't imagine that this is the way it is designed to work!
Do I have to set-up Outlook in some way to autosend - I can't find anything. Nor can I find any settings on the xp_sendmail command of this type.
Any ideas would be appreciated.
Robert
I'm trying to send email from a stored procedure (SQL Server 2000) using the xp_sendmail procedure call. My code is:
Code:
exec xp_startmail
exec xp_sendmail @recipients = 'robert@phoneticgroup.co.uk',
@message = 'Test Message A',
@subject = 'Test Subject A'
exec xp_stopmail
I'm using Outlook 2003 as my email and is set up correctly.
Running this code works in that I get no error messages and the email appears in Outlook. However, the email is not automatically sent - it just sits in the Inbox awaiting a manual Send (at which point it sends correctly). I don't imagine that this is the way it is designed to work!
Do I have to set-up Outlook in some way to autosend - I can't find anything. Nor can I find any settings on the xp_sendmail command of this type.
Any ideas would be appreciated.
Robert