December 10, 2008 at 1:38 am
Hello All,
I have created a job in SQL2005 what runs a SP and emails the results using 'sp_send_dbmail'
Problem
How can format the email to be more appealing? currently it is just standard text.
i.e. How could I add:
- font to selected sections?
- Maybe images (A banner at the top of the email)
Has any one found any good tutorials online?
thanks
December 10, 2008 at 2:20 am
I have seen the following example:
EXEC master.dbo.xp_smtp_sendmail
@server = 'SMTP.UK.CORP.Company.COM',
@from = 'sqladmin@company.co.uk',
@to = 'Paul.Smith@company.co.uk',
@subject = 'HTML Testing...',
@type = 'text/html',
@body =
But as far as i can see this is just a standard email with HTML formatting, I want to format the out come of my SP....
@query='exec procByAllSector'
December 11, 2008 at 6:35 am
Please use the variables declared in the attached example to set the @body parameter of the procedure dbo.xp_smtp_sendmail.
You can use the html tags to format your email body as you use these tags on an html web page.
December 11, 2008 at 1:37 pm
check out my reply in this thread - it may be helpful:
http://www.sqlservercentral.com/Forums/Topic616796-1291-1.aspx
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply