March 6, 2009 at 4:56 am
Hi,
I would like to use sp_send_dbmail for sending mails. There in the body, I want to pass HTML tags like in the body parameter. So that When the user clicks on the link in the mail, it should openup the page.
But HTML passes whatever we pass inside the parameter samething it is displaying all the tags.
If anyone encountered this, please let me know.
Thanks,
Peer Md.
March 6, 2009 at 9:34 am
Are you using the @body_format parameter and setting it to 'HTML' like this:
EXEC msdb.dbo.sp_send_dbmail @recipients = 'your_name@your_company.com', @subject = 'test',
@body_format = 'HTML', @body = '<b>Test</b> This works'
edit: Used the encode values for the the html tags so that they would show in the code block.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply