James
James

Reputation: 1

error '8004020f' classic asp sending mail

email application will not send getting error below

error '8004020f'

Set objMail=CreateObject("CDO.Message")
objMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "wpmssql1.worldispnetwork.com"
objMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMail.Configuration.Fields.Update
objMail.Subject="Your LaPineTrucks.com Password"
objMail.From="[email protected]"
objMail.To= Email
objMail.TextBody= Thank you
objMail.Send
set objMail=nothing

Upvotes: 0

Views: 2734

Answers (2)

GMcMickle
GMcMickle

Reputation: 1

Encountered this same '8004020f' error. It was due to switching web site from running standard to secure HTTP (HTTP to HTTPS). Configuration.Fields.Item ... functions required changing from "http://schemas.microsoft.com/cdo/..." to "https://schemas.microsoft.com/cdo/..."

Upvotes: 0

Fru T. Bunn
Fru T. Bunn

Reputation: 21

  1. Does the variable 'Email' hold the return address? If not then the line beginning objMail.To= to be objMail.To="[email protected]"
  2. You need to put "Thank you" into quotes

I made those changes (above) and changed the server IP and it worked at treat.

I use the application SMTP4DEV to test email funcitonality, there are probably others. You configure your server address to be '127.0.0.1' in your ASP code and all emails appear in this applicaiton; your real server won't be troubled. This can be real handy if you accidentally send thousands of emails in error as I did once.

I hope that helps you.

Upvotes: 1

Related Questions