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 = ""
    x.To = ""
    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.

Share This Page