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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending email from SQL Server 1

Status
Not open for further replies.

azeke

Programmer
Jan 17, 2001
8
US
Is there any way to modify the return email address when sending email from SQL Server?
 
I'm assuming you are using xp_readmail to get the recipients? You would be able to obtain the list (from the recipients parameter) into a variable, modify it, then send it out again... Is this what you are wanting to do? Tom Davis
tdavis@sark.com
 
The reply address of each email I send is stored in a table in my DB. I'm using xp_sendmail to send an email. The problem is, I can't substitute the return email address. It uses the return address of the mail account used to process the outgoing mail.
 
Couldn't you compose the message like this:

EXEC xp_sendmail @recipients = 'robertk;laurac',
@message = 'The master database is full.',
@copy_recipients = 'anned;michaels',
@subject = 'Master Database Status'

Where the @recipients or the @copy_recipients variable holds the reply addresses? I mean, can't you simply compose the message any way you wish to by manipulation the appropriate parameter in the call to xp_sendmail? Tom Davis
tdavis@sark.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top