CONTACT US: 1-800-622-4403
ABOUT    CONTACT SALES    SERVICE AREAS
Domains To Datacenter Since 1994

Using CDOSYS with POA accounts without authentication

Here is the code that you'll need to use using CDOSYS with POA without authentication


Please note you will want to replace the FROM and TO fields with valid email addresses.

---------- code starts below here ---------

<%
      ' Build HTML for message body
      strHTML = "<HTML>"
      strHTML = strHTML & "<HEAD>"
      strHTML = strHTML & "<BODY>"
      strHTML = strHTML & "<b> This is the test HTML message body</b></br>"
      strHTML = strHTML & "</BODY>"
      strHTML = strHTML & "</HTML>"

      set cdoMessage = Server.CreateObject("CDO.Message")
      set cdoConfig = Server.CreateObject("CDO.Configuration")

      cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
      cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1"
      cdoConfig.Fields.Update
      set cdoMessage.Configuration = cdoConfig

      cdoMessage.From = "FromEmailAddress@yourdomain.tld"
      cdoMessage.To = "ToEmailAddress@yourdomain.tld"
      cdoMessage.Subject = "This is a test CDOSYS message"
      cdoMessage.HtmlBody = strHTML
      cdoMessage.Send

      set cdoMessage = Nothing
      set cdoConfig = Nothing
%>

---------- code ends above here ---------

Feedback and Knowledge Base