Add e-mai signature to SQL Database Mail

  • 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

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • 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