May 28, 2013 at 5:00 am
Hi All,
Is it possible to configure SQL Server 2008 R2 database mail to add a signature to all e-mails sent out
Thanks
Denesh
May 28, 2013 at 5:26 am
Denesh Naidoo (5/28/2013)
Hi All,Is it possible to configure SQL Server 2008 R2 database mail to add a signature to all e-mails sent out
Thanks
Denesh
that's usually handled by either the client application, which might either use a template that includes the signature, or an option that appends the signature to the bottom of an email.
Depending on the mail server itself, many can add a signature there as well, and it can be appended on a specific user or global basis; for example, all outbound mail hitting our exchange server has some boilerplate verbiage attached to the bottom; but that's a mail server setting, and not something that is part of SQL server's database mail .
check with your email administrator to see what is possible on the server side; otherwise, you want to handle any signitures yourself;
For example you could create a procedure sp_mydbMail, which uses sp_send_dbmail, but appends a signiture to whatever parameters are sent to it.
Lowell
May 28, 2013 at 6:19 am
I modified sp_send_dbmail and added the following line at the start of the proc.
SET @body = @body + CHAR(13) + CHAR(10) + CHAR(13) + CHAR(10) + 'SQL Server Mail Sent From ' + @@SERVERNAME;
Note, you will lose these changes when you install service packs.
May 28, 2013 at 11:27 pm
Denesh Naidoo (5/28/2013)
Hi All,Is it possible to configure SQL Server 2008 R2 database mail to add a signature to all e-mails sent out
Thanks
Denesh
Try setting the @body_format='HTML'
and format your html tag (Body) while sending Emails, there by you can add signature.
Regards
Durai Nagarajan
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply