<%
Const cdoSendUsingMethod = "http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort = 2
Const cdoSMTPServer = "http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort = "http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPConnectionTimeout = "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
Const cdoSMTPAuthenticate = "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic = 1
Const cdoSendUserName = "http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword = "http://schemas.microsoft.com/cdo/configuration/sendpassword"
Dim oCDOConfig 'as CDO. Configuration
Dim ocdomessage' As CDO. Message
Dim Fields 'As ADODB. Fields
Set oCDOConfig = Server. CreateObject ("CDO. Configuration ")
Set Fields = oCDOConfig. Fields
With Fields
. Item (cdoSendUsingMethod) = cdoSendUsingPort
. Item (cdoSMTPServer) = "SMTP server" '// change to an available external email server Domain Name
. Item (cdoSMTPServerPort) = 25
. Item (cdoSMTPConnectionTimeout) = 10
. Item (cdoSMTPAuthenticate) = cdoBasic
. Item (cdoSendUserName) = "SMTP username" '// The username of the above server
. Item (cdoSendPassword) = "SMTP password" '// Password
. Update
End
Set oCDOMessage = Server. CreateObject ("CDO. Message ")
Set oCDOMessage. Configuration = oCDOConfig
With oCDOMessage
. From = Trim ("sender email address") '// the sender's email address
. To = Trim ("recipient email address") '// recipient's email address
. Subject = Trim ("mail title") '// mail title
. Cc = Trim ("Cc address") '// Cc address
. Bcc = Trim ("encrypted CC address") '// encrypted CC
. Bodypart. Charset = "UTF-8" '// Encoding
. TextBody = Trim ("body") '// text body
. HTMLBody = Trim (". CreateMHTMLBody "reads an HTML page as the mail body" '// available direct path/remote path/relative path
. AddAttachment "C: \ WINDOWS \ explorer. scf" '// email attachment
. Send
End
Set Fields = Nothing
Set oCDOMessage = Nothing
Set oCDOConfig = Nothing
%>
Source: http://Jorkin.Reallydo.Com/default.asp? Id = 491