If you get "8004020E" or "80040211" errors, and you are using a remote SMTP server, make sure that you can establish a telnet session on the SMTP server from the web server, that the SMTP server is configured to allow SMTP relay, and that it doesn't require outgoing SMTP authentication. If it requires outgoing authentication, you may need to use the commercial version of ASPEmail, or another component that supports outgoing SMTP authentication. You can send e-mail to an SMTP server requiring outgoing authentication with CDO using the following code:
I am pretty sure this is your error:
The message could not be sent to the SMTP server. ...