Using CDOSYS with Authentication
---------- code starts below here --------- <!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" NAME="CDO for Windows 2000 Library" --> <!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4" NAME="ADODB Type Library" --> <% Dim objMail Set objMail = Server.CreateObject("CDO.Message") Set objConfig = Server.CreateObject("CDO.Configuration") 'Configuration: objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort objConfig.Fields(cdoSMTPServer)="YOUR-MAIL-SERVER-HOSTNAME" objConfig.Fields(cdoSMTPServerPort)=25 objConfig.Fields(cdoSMTPAuthenticate)=cdoBasic objConfig.Fields(cdoSendUserName) = "email@yourdomain.com" objConfig.Fields(cdoSendPassword) = "xxxxxxxx" 'Update configuration objConfig.Fields.Update Set objMail.Configuration = objConfig objMail.From ="email@yourdomain.com" objMail.To = "recipient@yourdomain.com" objMail.Subject ="Information" objMail.TextBody="This is a test for CDO.message" objMail.Send If Err.Number = 0 Then Response.Write("Mail sent!") Else Response.Write("Error sending mail. Code: " & Err.Number) Err.Clear End If Set objMail=Nothing Set objConfig=Nothing %> ---------- code ends above here ---------