Troubleshooting

How to troubleshoot CDO.Message error 8004020F

Symptom

When you send an email using CDOSYS you get the following error


error ‘8004020f’

Cause

The error code is returned by CDOSYS when the email is rejected by the mail server.

Resolution

  • Make sure the ‘From’ email address is set correctly and is an email address etup on your account
  • Check that you have set the correct SMTP server.
  • Check that your hosting plan includes SMTP
  • If you use your ISPs SMTP server, check that they do not limit the use of their services.
  • Try using a SendUsing value of 1 (pickup) instead of 2 (port). E.g. the following line:
    .Item(cdoSendUsingMethod) = cdoSendUsingPort
    

    would become;

    .Item(cdoSendUsingMethod) = cdoSendUsingPickup
    

Was this guide helpful?

Need help with this?

Open a ticket and link to this guide so our team can see what you have tried.

View support tickets

Power your business with Ecenica Hosting

Built for WordPress and serious websites. Fast, secure and supported by real people in the UK.

Ecenica hosting services represented by a connected red route across London