navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Sending HTML CDONTS email.

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Microsoft FrontPage Help >> Sending HTML CDONTS email.
Page: [1]
 
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

(in reply to WRXSTi)
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

(in reply to WRXSTi)
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.

(in reply to WRXSTi)
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

(in reply to WRXSTi)
Page:   [1]

All Forums >> Web Development >> Microsoft FrontPage Help >> Sending HTML CDONTS email.
Page: [1]
Jump to: 1





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