Home Guides Glossary

How do I enable CDO.MESSAGE with MailEnable?

Some of the information in this article is advanced material we make available as a courtesy. Please be advised that you are responsible for properly following the procedures below. Customer Support cannot assist with these topics.

To send an email with Active Server Pages requires a component such as CDO.MESSAGE, which is supported on our Windows shared hosting servers.

To use MailEnable and CDOSYS at the same time you will need to change the Internet Information Services (IIS) SMTP port to port 8025 using the General tab in the SMTP virtual server properties dialog box. For more information on how to do this see Microsoft Windows Server Tech Center.

Next, you will need to add additional lines of code to the Code Snippet for CDO Messages.

Set objMail = Server.CreateObject("CDO.Message")
objMail.From = "YOUR FROM EMAIL ADDRESS"
objMail.To = "YOUR TO EMAIL ADDRESS"
objMail.Subject = "YOUR EMAIL SUBJECT LINE"
objMail.TextBody = "YOUR MESSAGE BODY"
objMail.Send

Set objMail = Nothing

Now, modify the Code Snippet for CDO Messages as follows.

sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = Server.CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "127.0.0.1" (add your smtp server address here)
.update
End With

Set objMail = Server.CreateObject("CDO.Message")
Set objMail.Configuration = cdoConfig
objMail.From = "YOUR FROM EMAIL ADDRESS"
objMail.To = "YOUR TO EMAIL ADDRESS"
objMail.Subject = "YOUR EMAIL SUBJECT LINE"
objMail.TextBody = "YOUR MESSAGE BODY"
objMail.Send

Set objMail = Nothing
Set cdoConfig = Nothing

For more information about CDOSYS, see MSDN.

Domain Registration

Pay less for website domain names. Register your own .com, .net or .org for as low as $10.18 per year. We have everything you need to get online with your new domain.

Website Builder

For as little as $3.89 per month you can build your Website online with Website Builder using our easy to use professional templates. Play Video - Demo

Quick Shopping Cart

Build and run your own successful online store in minutes. You're just five easy steps away! Shopping Cart works with Google® and eBay® Play Video

Website Hosting

Everything needed to give your website the high-performance home it deserves.  Protect transactions and secure your customer's data with a SSL Certificate

Copyright © 2005 - 2017. All rights reserved. Privacy Policy