CDO Mail. I can't seem to get started

Discussion in 'Email' started by JohnR, Nov 15, 2020.

  1. I'm in the process of moving a site here and one of the things I'll need to do is send automated emails when people sign up for an account.

    I had CDONTS when it was hosted at a different place, so I kept with CDO here.

    Here's what I started with, but I am getting 'error 8004020f' on the line that is the x.Send.

    both the to and the from emails are valid emails.

    Any suggestions?

    Dim x
    set x = Server.CreateObject("CDO.Message")
    x.From = "[email protected]"
    x.To = "[email protected]"
    x.Subject ="Subject for CDO mail test"
    x.TextBody = "This is a test for CDO.message"
    x.Configuration.Fields("") = ""
    x.Configuration.Fields("") = 2

    set x = nothing
  2. Elshadriel

    Elshadriel Winhost Staff

    You need to provide SMTP authentication. We also provide sample code here.
  3. The CDO could be an old tecnology which is last updated in 2004 for exchange 2003. The CDO technology is still avalibale but the remote SMTP server service for CDO seems has stopped while it return 404 error. So maybe you could just test to send email locallly or change the parameter to another remote SMTP server service.


Share This Page