Friday, May 14, 2010

Fixing ASP when sending from server -- error '8004020e'

I did a little ASP page for a Flash website that mails from a form -- standard stuff. However, I was getting error '8004020e'. I researched this on the web and found the helpful link: http://support.bebosoft.com/kb/article.php?knoid=117&t=The+script+returns+error+8004020e. It turns out that I was setting the "From" value in the CDO code to be the actual email address that the user entered in the form. Since I was trying to send a message from the server from a domain not hosted on the server, it appeared to the server as spam and was rejected. When I changed the "From" to the actual domain name hosted (e.g. website@domainname.com) it ran fine. I thought that setting the "From" to be the person sending the email was a good idea, but now I understand how that could appear to be spam and an invalid address. Lesson learned!

1 comment:

  1. From "From" value is an email from the domain hosted on the server, my smtpserver, sendusername, sendpassword, authenticate, usessl etc. settings are all correct, and I'm still getting this error.

    ReplyDelete