Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Sending email with CDO

Reply
Thread Tools

Sending email with CDO

 
 
Boris
Guest
Posts: n/a
 
      07-07-2004
I asked how to send an email using CDO instead of CDONTS and got several responses. They were all good, I tested the code and it works well. However, I forgot to mention that I need to set the email body to be in HTML rather than in plain text format. Would appreciate if someone could post a complete example on how to do this.
Many thanks in advance

 
Reply With Quote
 
 
 
 
dlbjr
Guest
Posts: n/a
 
      07-07-2004
myMail.From = "(E-Mail Removed)"
myMail.To = "(E-Mail Removed)"
myMail.Subject = "Subject"
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.Body = strHTML
myMail.Send

-dlbjr

Discerning resolutions for the alms


 
Reply With Quote
 
 
 
 
Boris
Guest
Posts: n/a
 
      07-07-2004
Sorry, the example below is no good. This is the message I got:"Error Type:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'MailFormat'
/test.asp, line 17"


"dlbjr" wrote:

> myMail.From = "(E-Mail Removed)"
> myMail.To = "(E-Mail Removed)"
> myMail.Subject = "Subject"
> myMail.BodyFormat = 0
> myMail.MailFormat = 0
> myMail.Body = strHTML
> myMail.Send
>
> -dlbjr
>
> Discerning resolutions for the alms
>
>
>

 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      07-07-2004
With CDO.Message you just have to set the HtmlBody property instead of the
TextBody property... This is the only change.

Patrice

--

"Boris" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed)...
> I asked how to send an email using CDO instead of CDONTS and got several

responses. They were all good, I tested the code and it works well. However,
I forgot to mention that I need to set the email body to be in HTML rather
than in plain text format. Would appreciate if someone could post a complete
example on how to do this.
> Many thanks in advance
>



 
Reply With Quote
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      07-07-2004
http://www.aspfaq.com/2026
http://www.aspfaq.com/2474

--
http://www.aspfaq.com/
(Reverse address to reply.)





"Boris" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I asked how to send an email using CDO instead of CDONTS and got several
>responses. They were all good, I tested the code and it works well.
>However, I forgot to mention that I need to set the email body to be in
>HTML rather than in plain text format. Would appreciate if someone could
>post a complete example on how to do this.
> Many thanks in advance
>



 
Reply With Quote
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      07-07-2004
> myMail.MailFormat = 0

? Are you sure this is for CDO.Message?

--
http://www.aspfaq.com/
(Reverse address to reply.)


 
Reply With Quote
 
mgm
Guest
Posts: n/a
 
      09-29-2004
oMessage.BodyPart.ContentMediaType = "text/html"
oMessage.HtmlBody = strBody

"Boris" wrote:

> I asked how to send an email using CDO instead of CDONTS and got several responses. They were all good, I tested the code and it works well. However, I forgot to mention that I need to set the email body to be in HTML rather than in plain text format. Would appreciate if someone could post a complete example on how to do this.
> Many thanks in advance
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending email using ASP (CDO or Exchange) Drew ASP General 1 12-09-2004 02:13 PM
sending image thru email + CDO dave ASP General 2 06-08-2004 02:00 PM
sending email using CDO Message dave ASP General 1 05-05-2004 01:17 PM
Sending multipart email with CDO object and 7bit encoding Irene ASP General 0 05-01-2004 01:35 PM
CDO not sending email Jay ASP General 5 01-15-2004 08:15 PM



Advertisments