> ## Documentation Index
> Fetch the complete documentation index at: https://kb.mochahost.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sending e-mails using ASP and CDOSYS

Sending e-mails using ASP and CDOSYS - sample code:

\`

\<%\
Dim ObjectSendMail\
Dim Conf\
Dim Fields\
Set ObjectSendMail = Server.CreateObject("CDO.Message")\
Set Conf = Server.CreateObject("CDO.Configuration")\
Set Fields = Conf.Fields\
With Fields\
.Item(cdoSendUsingMethod) = 2\
.Item(cdoSMTPServer) = "localhost"\
.Item(cdoSMTPServerPort) = 25\
.Item(cdoSMTPconnectiontimeout) = 10\
.Item(cdoSMTPAuthenticate) = cdoBasic\
.Item(cdoSendUserName) = "USERACCOUNT"\
.Item(cdoSendPassword) = "PASSWORD"\
.Update\
End With\
Set ObjectSendMail.Configuration = Conf\
Set ObjectSendMail.Configuration = Conf\
ObjectSendMail.Subject = "My message subject"\
ObjectSendMail.From = "[you@yourdomain.com](mailto:you@yourdomain.com)"\
ObjectSendMail.To = "[someone@domain.com](mailto:someone@domain.com); [somebody@domain.com](mailto:somebody@domain.com)"\
ObjectSendMail.TextBody = "This is a plain text email"\
ObjectSendMail.Send\
Set ObjectSendMail = Nothing\
Set Conf = Nothing\
Set Fields = Nothing\`

NOTE: Please note that you cannot use System.Net.Mail.SmtpClient to send an e-mail message with Implicit SSL.
