There are some common setting that I find myself using when sending mail via the sp_send_dbmail command. I like these two features the best:
- @from_address, which you can use to change the sender’s display name
- This feature (variable) is only supported in 2008 and above.
I’ve included an example of what I usually include in my send_mail calls:
@profile_name = 'SQL DBA Group',
@recipients = 'email(@)domain.com',
@blind_copy_recipients = 'email(@)domain.com',
@from_address = 'Display Name <no-reply(@)domain.com>',
@body = 'Email Body.',
@subject = 'Subject'