sp_send_dbmail

  • Hi,

    In SQL Server 2005 Standard edition, we have enabled Database mail and are able send mail using sp_send_dbmail procedure. The @body_format is specified as HTML. I am getting the mail in HTML format without any issue except few Junk Characters shown below are coming in addition to the body of the mail.

    (n ,NjrjuvuɶuͱryvmyzjɞNq~qyjʲ).

    Will this be because of the Default Disclaimer set in exchange server. If yes, please let me know how to prevent these Junk characters from getting displayed.

    The exec statement used by me is given below

    EXEC msdb.dbo.sp_send_dbmail

    @recipients = 'snmsheik@rsi.ramco.com',

    @subject = 'My Mail Test',

    @body = 'Database mail Test',

    @body_format = 'HTML'

    Output:

    Database mail Testn , Njw!frj)ܢwu퉩Z讚)^b+bvv+"קulW+u޲Ǟ|n謲rr!y֧vfm맕RʋyǢaɞƠz)ޮ+W^^ئbjץɩݞb+NjZ&qmz%+r~ڟ'Zqyj|h[bf

    Kindly help me to resolve.

  • Hi

    I have just ran you code throught our system and got the email without any problems, What email server are you using to send the email and what app are you using to read the email?

  • In Exchange server, mail disclaimer has been set in HTML format.

  • Might be to do with the disclaimer, can you try it without or try the code as below?

    EXEC msdb.dbo.sp_send_dbmail

    @recipients = 'snmsheik@rsi.ramco.com',

    @subject = 'My Mail Test',

    @body = 'Database mail Test'

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply