|
 |
asp_cdo thread: CDO - Sending html and text mail
Message #1 by starmach1917@h... on Sun, 23 Sep 2001 01:41:43
|
|
Hi, i would like to know how i can send text and html in the same email.
So if the person i'm emailing to doesn't have email support they will
recieve a text email. This piece of code sends the html part but i'm
unsure how to get the text part in. Any thoughts?
dim objSendMail
Set objSendMail = server.CreateObject ("CDONTS.NewMail")
body = "<Html>"
body = body & "<Head>"
body = body & "<Title>Title Test</Title>"
body = body & "</Head>"
body = body & "<Body>"
body = body & "Testing html e-mail"
body = body & "</Body>"
body = body & "</Html>"
body2 = "<html><head></head><body>normal test</body></html>"
With objSendMail
.from = "starmach1917"
.To = "starmach1917@h..."
.Subject = "testing sendmail"
.BodyFormat = CdoBodyFormatHTML
.MailFormat = CdoMailFormatMIME 'CdoMailFormatText
.Body = body
.Importance = 2
.Send
end with
set objSendMail = nothing
Message #2 by ashishk@a... on Fri, 28 Sep 2001 09:10:53
|
|
Hv U find out the solution, I am also looking for same solution.
PLease reply me on ashishk@a...
> Hi, i would like to know how i can send text and html in the same
email.
> So if the person i'm emailing to doesn't have email support they will
> recieve a text email. This piece of code sends the html part but i'm
> unsure how to get the text part in. Any thoughts?
>
> dim objSendMail
>
> Set objSendMail = server.CreateObject ("CDONTS.NewMail")
>
>
> body = "<Html>"
> body = body & "<Head>"
> body = body & "<Title>Title Test</Title>"
> body = body & "</Head>"
> body = body & "<Body>"
> body = body & "Testing html e-mail"
> body = body & "</Body>"
> body = body & "</Html>"
>
> body2 = "<html><head></head><body>normal test</body></html>"
>
> With objSendMail
> .from = "starmach1917"
> .To = "starmach1917@h..."
> .Subject = "testing sendmail"
> .BodyFormat = CdoBodyFormatHTML
> .MailFormat = CdoMailFormatMIME 'CdoMailFormatText
> .Body = body
> .Importance = 2
> .Send
> end with
>
> set objSendMail = nothing
|
|
 |