|
 |
asp_cdo thread: email text, html
Message #1 by dont worry <aspmailbox@y...> on Thu, 25 Oct 2001 11:05:15 -0700 (PDT)
|
|
I want to allow users to select if they want emails
sent in html or plain text. I have the email message
in a database table that is sent. What is the best
way to get this done?
Thank you
Message #2 by "Martin Grundy" <martin.grundy@s...> on Fri, 26 Oct 2001 09:14:22
|
|
> I want to allow users to select if they want emails
> sent in html or plain text. I have the email message
> in a database table that is sent. What is the best
> way to get this done?
> Thank you
>
>
I hold a flag on the database set to "HTML" or "plain".
Your users need to be able to set this flag.
I also hold the text of the e-mail in two different formats on the
database, HTML text and plain text.
I then use an ODBC link to read the database via an ASP page.
To send the e-mail:
set myMail = Server.CreateObject("CDONTS.NewMail")
myMail.From = FromPerson
myMail.To = ToPerson
myMail.subject = Subject
myMail.MailFormat = 0
If TextFlag = "HTML" then
myMail.BodyFormat = 0
myMail.Body = HTMLText
else
myMail.BodyFormat = 1
myMail.Body = PlainText
end if
myMail.Send
set myMail = Nothing
|
|
 |