patternsqlMinor
Replace the server name in email sender address when sending email from SQL Server 2008
Viewed 0 times
theaddress2008emailsqlsenderreplacesendingnamewhen
Problem
I'm sending emails directly to Microsoft Outlook accounts from SQL Server 2008. Everything is fine, email was sent. Only problem is that in the header of the email the SQL Server name is embedded.
I've tried specifying the @from_address when executing the mail sending in DB but the sql server name is still there in the email's header. I don't want my recipients to see the sql server name in the header.
Is there a way to block this?
Thanks much!
I've tried specifying the @from_address when executing the mail sending in DB but the sql server name is still there in the email's header. I don't want my recipients to see the sql server name in the header.
Is there a way to block this?
Thanks much!
Solution
Try creating a new database mail profile and database mail account. Put the email address you desire as the name of the new mail account. Then use the profile when calling the stored procedure to send email:
EXEC msdb.dbo.sp_send_dbmail
@profile_name = "DB Mail Profile"
Cheers!
EXEC msdb.dbo.sp_send_dbmail
@profile_name = "DB Mail Profile"
Cheers!
Context
StackExchange Database Administrators Q#9267, answer score: 2
Revisions (0)
No revisions yet.