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

sp_send_dbmail + from address

Status
Not open for further replies.

vlitim76

Programmer
Jun 1, 2006
19
GB
I am just looking at sending email from SQL 2005, and have a question about the sp_send_dbmail procedure.

I need to be able to specify a "from" address, but as far as I can see you cannot do this, but instead have to tie the message to a profile.

Can someone confirm this.

Cheers

Tim
 
That is correct. You specify the from address in the mail profile. You could create a profile with the from address that you need and use that profile.

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
ok, that seems very annoying. The software we have developed emails people based on certain events, so I create an appointment and you get an email from me telling you so. The way SQL 2005 is setup I would have to create a profile for every user in the system, which when we are talking 100's is going to be a nightmare. Why can't I just specify a from address?

anyway enough ranting, will just have to stay with what we have got.

cheers

Tim
 
I know in my case I don't want people to reply to any database mail they receive. So my from address is NoReply@FirstCompSQLServer.com

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
Yeah that's what we need it to do. Can't believe they haven't added that sort of functionality, tying it to profiles seem ridiculous.
 
you can set up a script which does the e-mailing with spoof from addresses and then use xp_cmdshell to run that script

which is sort of what I've implemented before...

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top