<% Const cdoBasic = 1 'Use basic (clear-text) authentication. Const cdoSendUsingPort = 2 Dim iMsg Dim iConf Dim Flds On Error Resume Next 'Create message and configuration objects set iMsg = CreateObject("CDO.Message") set iConf = CreateObject("CDO.Configuration") Set Flds = iConf.Fields 'Appluy settings to the configuration object With Flds ' Specify the authentication mechanism to basic (clear-text) authentication. .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic ' The username for authenticating to an SMTP server .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "MAIL_SMTP_USERNAME" ' The password used to authenticate to an SMTP server .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "MAIL_SMTP_PASSWORD" .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort 'Specify mail server .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "MAIL_SMTP_SERVER" 'Specify the timeout in seconds .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10 ' The port on which the SMTP service specified by the smtpserver field is listening for connections (typically 25) '.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 'Use SSL for the connection (False or True) '.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False .Update End With Dim sMsg Dim sTo Dim sCC Dim sFrom Dim sSubject Dim sTextBody sTo = "recipient@maildomain.com" sCC = "CCrecipient@maildomain.com" sFrom = "fromaddress@maildomain.com" sSubject = "Insert here your subject text" sTextBody = "Insert here your plain body text" 'Apply the settings to the message object With iMsg Set .Configuration = iConf .To = strTo .From = strFrom If strCC <> "" Then .CC = strCC End If .Subject = strSubject .TextBody = strBody 'Send message .Send End With ' cleanup mail objects Set iMsg = Nothing Set iConf = Nothing Set Flds = Nothing %>