Hi,
I'm using CDONTSMail to send myself and a couple of important people an email that includes content from a database table..
I include the data from the database to be presented in columnar form in the email. I'm having trouble with the width. I've included five-six columns from the database and the width of the email has gotten long. As a result rows of data get wrapped, which is not what I want. I would like each row to appear on one line only, because there are column headers. The email looks really awkward and obscure that way. Here is my code:
<!--#include file="incl/data.asp"-->
sql = "...."
Set MyRS = Server.CreateObject("ADODB.RecordSet"
MyRS.CursorType=adOpenDynamic
MyRS.CursorLocation = adUseClient
MyRs.Open sql, MyConn
Set sendmail = Server.CreateObject("CDONTS.NewMail"
sendmail.From = "saadm_wharton@yahoo.com"
sendmail.To = "saadm_wharton@yahoo.com; emailaddress2; emailaddress3"
sendmail.Subject = "Daily Report - " & Date
BodyText = "Changes made today in the database"
Do While NOT MyRS.EOF
BodyText = BodyText & MyRS("FieldsChanged"
MyRS.MoveNext
Loop
sendmail.Body = BodyText
'this sets mail priority.... 0=low 1=normal 2=high
sendmail.Importance = 2
sendmail.Send
%>
Thanks in-advance for your help..
Saad
I'm using CDONTSMail to send myself and a couple of important people an email that includes content from a database table..
I include the data from the database to be presented in columnar form in the email. I'm having trouble with the width. I've included five-six columns from the database and the width of the email has gotten long. As a result rows of data get wrapped, which is not what I want. I would like each row to appear on one line only, because there are column headers. The email looks really awkward and obscure that way. Here is my code:
<!--#include file="incl/data.asp"-->
sql = "...."
Set MyRS = Server.CreateObject("ADODB.RecordSet"
MyRS.CursorType=adOpenDynamic
MyRS.CursorLocation = adUseClient
MyRs.Open sql, MyConn
Set sendmail = Server.CreateObject("CDONTS.NewMail"
sendmail.From = "saadm_wharton@yahoo.com"
sendmail.To = "saadm_wharton@yahoo.com; emailaddress2; emailaddress3"
sendmail.Subject = "Daily Report - " & Date
BodyText = "Changes made today in the database"
Do While NOT MyRS.EOF
BodyText = BodyText & MyRS("FieldsChanged"
MyRS.MoveNext
Loop
sendmail.Body = BodyText
'this sets mail priority.... 0=low 1=normal 2=high
sendmail.Importance = 2
sendmail.Send
%>
Thanks in-advance for your help..
Saad