|
| |
|
|
WRXSTi
Posts: 30 Joined: 2/7/2002 From: MA USA Status: offline
|
Sending HTML CDONTS email. - 3/4/2002 11:11:40
Can some one please tell me why this HTML CDONTS code does not work. I placed it in the body of my .asp page. Send a HTML CDONTS email. <% Option Explicit Dim objNewMail Dim strSubject Dim strBody strSubject = "Test this HTML mail" strBody = "<body>" &_ "<br>" & _ "<h1>Hello</h1>" & _ "</body>" Set objNewMail = Server.CreateObject("CDONTS.NewMail") objNewMail.To = "jim.jenn@verizon.net" objNewMail.From = "email@andersonj.net" objNewMail.Subject = strSubject objNewMail.Body = strBody objNewMail.MailFormat = 0 objNewMail.BodyFormat = 0 objNewMail.Send set objNewMail = nothing %> If I send a text message it works. Text message here: <% Dim objNewMail Set objNewMail = Server.CreateObject("CDONTS.NewMail") objNewMail.To = "jim.jenn@verizon.net" objNewMail.From = "email@andersonj.net" objNewMail.Subject = "This is a subject" objNewMail.Body = "This is body" objNewMail.Send set obNewjMail = nothing Response.write("Mail was Sent") %> Me
|
|
|
|
Spooky
Posts: 26603 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Sending HTML CDONTS email. - 3/4/2002 15:04:51
Try this order :) objNewMail.MailFormat = 0 objNewMail.BodyFormat = 0 objNewMail.Body = strBody §þððk¥ Database / DRW Q & A VP-ASP Shopping cart Spooky Login
|
|
|
|
WRXSTi
Posts: 30 Joined: 2/7/2002 From: MA USA Status: offline
|
RE: Sending HTML CDONTS email. - 3/4/2002 16:17:27
The following also failed. <% Option Explicit Dim objNewMail Dim strSubject Dim strBody strSubject = "Test this HTML mail" strBody = "<body>" &_ "<br>" & _ "<h1>Hello</h1>" & _ "</body>" Set objNewMail = Server.CreateObject("CDONTS.NewMail") objNewMail.To = "jim.jenn@verizon.net" objNewMail.From = "email@andersonj.net" objNewMail.Subject = strSubject objNewMail.MailFormat = 0 objNewMail.BodyFormat = 0 objNewMail.Body = strBody objNewMail.Send set objNewMail = nothing %> Me
|
|
|
|
neocortex
Posts: 24 Joined: 1/14/2002 From: Glasgow United Kingdom Status: offline
|
RE: Sending HTML CDONTS email. - 3/4/2002 18:16:19
try this : <% objNewMail.MailFormat = cdoMailFormatMIME objNewMail.BodyFormat = cdoBodyFormatHTML %> NC Programming today, is a race between software engineers striving to build bigger and better 'idiot-proof' programs, and the Universe, trying to produce bigger and better idiots....So far, the Universe seems to be winning.
|
|
|
|
Spooky
Posts: 26603 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Sending HTML CDONTS email. - 3/5/2002 2:48:01
There must be something wrong with either the component or the email client, the script works quite happily on my server. The other constants can only be used when using the CDOVBS.inc file - but the values are the same as above anyhow. §þððk¥ Database / DRW Q & A VP-ASP Shopping cart Spooky Login
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|