View email body when it's in HTML format

  • Anyone know if there's a way to view the body of a sent email, when it's in HTML format?

    I looked at the 'sysmail_allitems' view located in the 'msdb' database, but the 'body' field is blank when the format is HTML. I can see any 'text' body without a problem.

    TIA.

    ----------------------------------------------------------------------------
    Sacramento SQL Server users group - http://sac.sqlpass.org
    Follow me on Twitter - @SQLDCH
    ----------------------------------------------------------------------------

    Yeah, well...The Dude abides.
  • I have not seen this issue. I ran a simple test with a fairly long email from Outlook and could read the body in sysmail_allmailitems.

    SQL Server is just storing the body in an nvarchar(max) column so there is no reason I know of where you should not be able to see the message.

  • Thanks Jack. Interestingly, the data type for the 'body' field in my 'msdb' database is 'ntext' (based on sp_columns). And, I was able to partially see the data by copying and pasting the field. I'll dump the contents to a file to get what I need.

    ----------------------------------------------------------------------------
    Sacramento SQL Server users group - http://sac.sqlpass.org
    Follow me on Twitter - @SQLDCH
    ----------------------------------------------------------------------------

    Yeah, well...The Dude abides.

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

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