How to send email using ASP and CDOSYS

The following ASP script can be used to send email using CDOSYS on our servers.

Dim iConfig
Dim theFlds
Dim objCDOMail

Set iConfig = Server.CreateObject ("CDO.Configuration")
Set theFlds = iConfig.Fields

'Set and update fields properties
theFlds("") = 25
theFlds("") = ""
theFlds("") = 60
theFlds("") = 2
theFlds("") = 1
theFlds("") ="yourpassword"


'Create the e-mail server object
Set objCDOMail = Server.CreateObject("CDO.Message")
Set objCDOMail.Configuration = iConfig

objCDOMail.From = ""
objCDOMail.To = ""
objCDOMail.Subject = "Email Subject"
objCDOMail.TextBody="Email Body"

'Close the server mail object
Set objCDOMail = Nothing
Set theFlds= Nothing
Set iConfig = Nothing

You may also find the following useful

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Connection timeout or no file or directory listing when connecting via FTP

A common issue when trying to connect via FTP to a server is to receive a connection timeout or...

Can I use an external email server?

In the control panel, the MX Entry Maintenance option allows you to choose where your email gets...

What is an email "alias" or "forwarder" and what is it for? (Linux Hosting)

An email forwarder is an email address that exists only to forward emails to other addresses....

Configuring SolidCP to use your own Name Servers

If you have a reseller account you may want to use your own name servers with your customer's...

Mail Server error 550 No such user here

I get the following error when sending emails. Server error: '550 No such user here' This is...