Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
VPeters
Starting Member
20 Posts |
Posted - 2007-01-30 : 08:14:49
|
| Hi everyone,I'm hoping someone can steer me in the right direction. I created a trigger that inserts a record into a table. I then created a stored procedure that will get kicked off by a job that will run hourly. The proc looks at the table to which the trigger appends, evaluates the data, and executes the appropriate sp_send_dbmail statement based on the data.So far, so good. I'm getting the emails, one per record, with the right subject and results. The problem is the emails are a MESS. And I have no idea how to format them. I don't even know if I *can* format them. I know I could attach my results as a text file, but that's not ideal either. The purpose of the email is to let someone know that a customer has gone online and submitted a form requesting something. The results need to state what they are requesting, include their name, address, or other pertinent informatin. It needs to be easy to read. It's one email per request, but the request could have several items in it (i.e., the customer may have been asked 'what are you interested in' and may have checked anywhere from 1 to 9 boxes. I need to show those items, preferably w/out repeating the question, customer name, address, etc., 9 times! Does anyone know if this is doable? Thanks much! |
|
|
MohammedU
Posting Yak Master
145 Posts |
Posted - 2007-01-31 : 01:17:36
|
| You can't do good formatting and HTML not supported..But there are some alternatives...You can use sp_makewebtask procedure to generate HTML file and send it as an attachement with xp_sendmail...OR you can xp_smtp_sendmail..http://www.sqldev.net/xp/xpsmtp.htmhttp://classicasp.aspfaq.com/email/how-do-i-send-e-mail-in-html-format.htmlMohammedU |
 |
|
|
|
|
|
|
|