HTML Email

D

dave

Hi guys
I'm sending email using CDO Message in HTML Formatted.
There is no problem if client side is HTML Enable. But if
it doesnt not, its showing all html tags in message body.
How can I solve this?
Thanx

code snippet

body = <html>
body = body & "<b>Hello</b>"
body = body & "</html>"
 
R

Ray at

Some people would say that you should just send plain text e-mail, since you
cannot control the environment in which your message will be read. I don't
necessarily fully disagree with this. The other option is to send a
multipart message that contains both an HTML version and a plain text
version of your message.

<quote source="http://www.aspfaq.com/show.asp?id=2474">

If you have a registered copy of ASPEmail 4.5 (http://www.aspemail.com/),
you can provide multipart content, so that non-HTML-aware readers can have
an alternate version:
<%
Set RegASPEMailer = Server.CreateObject("Persits.MailSender")
With RegASPEmailer
.Host = SMTPServer
.IsHTML = True
.FromName = FromName
.From = FromAddress
.AddAddress ToAddress, ToName
.Subject = Subject
.Body = htmlbody
.AltBody = textbody
.Send
End With
Set RegASPEMailer = Nothing
%>
</quote>

Multipart with CDO:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rma/delivery.asp

Ray at home
 
D

dave

Thanx
-----Original Message-----
Some people would say that you should just send plain text e-mail, since you
cannot control the environment in which your message will be read. I don't
necessarily fully disagree with this. The other option is to send a
multipart message that contains both an HTML version and a plain text
version of your message.

<quote source="http://www.aspfaq.com/show.asp?id=2474">

If you have a registered copy of ASPEmail 4.5 (http://www.aspemail.com/),
you can provide multipart content, so that non-HTML- aware readers can have
an alternate version:
<%
Set RegASPEMailer = Server.CreateObject ("Persits.MailSender")
With RegASPEmailer
.Host = SMTPServer
.IsHTML = True
.FromName = FromName
.From = FromAddress
.AddAddress ToAddress, ToName
.Subject = Subject
.Body = htmlbody
.AltBody = textbody
.Send
End With
Set RegASPEMailer = Nothing
%>
</quote>

Multipart with CDO:
http://msdn.microsoft.com/library/default.asp? url=/library/en-us/rma/delivery.asp

Ray at home






.
 
D

David C. Holley

Or you could always do something where you ask the user their preferred
email format.
 
A

Aaron [SQL Server MVP]

I don't necessarily fully disagree with this.

This is going on my wall of quotes, not because it's funny, but because it
makes me dizzy. :=|
 
H

hs234

try OstroSoft SMTP Component
http://www.ostrosoft.com/smtp_component.asp

Set oSMTP = Server.CreateObject("OSSMTP.SMTPSession")
With oSMTP
.Server = sServer
.MailFrom = sMailFrom
.SendTo = sSendTo
.MessageSubject = sMessageSubject
.MessageText = sMessageText
.MessageHTML = sMessageHTML
.SendEmail
End With

they have more samples on-line

hs234
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,416
Latest member
LionelQ387

Latest Threads

Top