Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with xp_sendmail and Outlook

Status
Not open for further replies.

EriRobert

MIS
May 9, 2003
114
GB
Hello everyone

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top