Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formating Emails Body sent with xp_sendmail

Status
Not open for further replies.

TMRO

Technical User
Jan 10, 2003
140
CA
Hi,

I'm using xp_sendmail to send automatically emails from SQL Server 2000, regarding different status from the main database.

Is there a way to format the email body so that it looks more friendly? Like breaklines / hyperlinks / bold ???

Thank you
 
Yes, there is at least partly.

You have to code a line break with a variable (I used @cr varchar(5)) and then set it to @cr='
'

A tab would be @tab and set it to @tab=' '

For the rest of the formatting options you've asked about, SQLMail is plain text which does not support bold, font type or size or colors, so you may have to look at third party SQLMail stored procedures to use instead of the standard.

Margaret
 
As eyespi20 said xp_sendmail doesn't support HTML.

Google for xp_sendsmtpmail. It does support html, and uses any SMTP server to send the emails out.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top