We help IT Professionals succeed at work.

CDONTS - HTML email format

Fezi
Fezi asked
on
Medium Priority
661 Views
Last Modified: 2012-06-27
Hi There, i am trying to send an HTML Email, but i get an error, see below.

This is a multi-part message in MIME format.

--CS_MAIL_Part_Boundary_10301998--

Please let me know what i am doing wrong. I am using ASP (vbscript)

The code i have is as follows:
HTML = "<html>" & vbCrLF
HTML = HTML & "<body>" & vbCrLf
HTML = HTML & "Hello " & a & "<br><br>" & vbCrLf
HTML = HTML & "Username: " & c & vbCrLf 
HTML = HTML & "password " & b & vbCrLf
HTML = HTML & "</body>" & vbCrLf
HTML = HTML & "</html>" & vbCrLf
 
 
Set objMail = Server.CreateObject( "CDONTS.NewMail" )
objMail.To = Request.form("email")
objMail.From = "example.com <name@example.com>"
objMail.Subject = "Admin account created for " & a
objMail.HTMLBody = HTML
objMail.Mailformat = 0 
objMail.Bodyformat = 0 
 
objMail.Host = "mailout.one.com"
objMail.Send
Set objMail = Nothing

Open in new window

Comment
Watch Question

Commented:
First off, CDONTS is very old technology and is not supported on the newer operating systems (windows 2000, xp, vista).  CDOSYS is the replacement.
 
objMail.HTMLBody = HTML
should be
objMail.Body = HTML

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
This does not work...
Wayne BarronAuthor, Web Developer
CERTIFIED EXPERT
Top Expert 2009
Commented:
What other Mail components does your hosting company offer?
I use to use JMail (But the hosting company does not support it, so no testing in that no more)
ASPMail, ASPJMail
Them 2 I might be able to assist you with.
Just let me know.

Author

Commented:
all i knw is that they have CDONTS and they have an apache chilisoft server. my hosting company is one.com .. I was thinking to use JMail, but don't exactly want to use any outside components, trying to build everything hardcoded.

So.. is there anything that we can do with this then?
Author, Web Developer
CERTIFIED EXPERT
Top Expert 2009
Commented:
Contact thier support line, and ask them what
Email components that they allow?
ASPMail
ASPQMail
Jmail
exc.....

Author

Commented:
It works.. wooo

see below code..
HTML = "<html>" & vbCrLF
HTML = HTML & "<body>" & vbCrLf
HTML = HTML & "<table bordercolor='#333333' border='1' align='center' width='500px' cellpadding='8' cellspacing='0' style='font-family:verdana;font-size:11px;'>" & vbCrLf
HTML = HTML & "<tr><td align='center'>" & vbCrLf
HTML = HTML & "<p align='left'><br><br>Dear " & a & vbCrLf
HTML = HTML & "<br><br><br>"
HTML = HTML & "<b>Username: " & c & "</b>" & vbCrLf
HTML = HTML & "<br><br>" & vbCrLf
HTML = HTML & "<b>Password: " & b & "</b>" & vbCrLf
HTML = HTML & "<br><br>URL will be delivered by word of mouth" & vbCrLf
HTML = HTML & "<br><br>Please keep your details out of sight and help protect your account." & vbCrLf
HTML = HTML & "<br><br><br><br>" & vbCrLf
HTML = HTML & "</p></td></tr></table>" & vbCrLf
HTML = HTML & "</body>" & vbCrLf
HTML = HTML & "</html>" & vbCrLf
 
 
 
Set objMail = Server.CreateObject( "CDONTS.NewMail" )
objMail.To = Request.form("email")
objMail.From = "example from
objMail.Subject = "Admin account created for " & a
objMail.Body = HTML
objMail.Mailformat = 0 
objMail.Bodyformat = 0 
objMail.Value("Content-Transfer-Encoding") = "8bit" 
objMail.Host = "host"
objMail.Send
Set objMail = Nothing

Open in new window

Author

Commented:
i will still award points for the help and time. :)
Wayne BarronAuthor, Web Developer
CERTIFIED EXPERT
Top Expert 2009

Commented:
Good going!!!!
that is the way to tackle it.
But you might want to consider one of the new components in the future
For more robust solutions.
Like myself.
I am getting ready to learn ASPMail (or) ASPQMail whick ever one gives me the best results
For what I need.

Have a good one.

Author

Commented:
Hi there, ASPMail is pretty good, JMail is not too bad, my hosting company (one.com) don't allow their customers to install any components.

Most likely get my own server as it is benefitical in many ways. (thinking about it)
Wayne BarronAuthor, Web Developer
CERTIFIED EXPERT
Top Expert 2009

Commented:
Yes on the getting your own server.
The Server itself is not going to cost a lot of money, About $1,000.00-$5,000.00 depending on
What type of setup that you are going for.
And can cost much more.

The big one is going to be getting a dedicated line for Internet brought in for it.
Not unless you are in an area where they already have "Fiber to the Curb"
If you are amoung them lucky ones, then you are already set..

have a good one Fezi
Carrzkiss
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.