Why does CDO.Message give 800C000D errors?
You might see this:
There are various reasons for this to happen. Here are some code samples to reproduce this error message:
This can be caused if you forget the protocol on your URL, or just put a filename. For example:
Make sure you get the URL right. CDO.Message does not understand relative URL formats; it has to be the FULL URL.
If your URL is in the correct format but the server cannot be found, you will get:
If the server is valid but the page cannot be found, you will get:
And if you reference a page that has an error, you might get an even less helpful response:
(No error message text.)
If you have something like:
You will get:
Many people use .AddAttachment method to add a file to an outgoing message. However, they don't realize that you need to give it a full path, rather than just a filename. The following should reproduce the error:
CDO.Message does not have any context for the location of the script that is calling it. So it has no idea that the file is supposed to come from the same folder as the script, if that was your intention. Include the full local path to the file (you can still use Server.MapPath here). The following are all valid formats, assuming the files exist:
And no, the same error message isn't raised if you attach a file that doesn't actually exist. If you specify such a filename, you will get:
And if you try to attach a file from a folder or drive that doesn't exist (e.g. if you made a typo in the path), you will get:
Make sure IUSR (or the authenticated user) has access to the file(s) and folder(s) you are accessing. Otherwise, you will see this:
Related ArticlesCan I get CDO messages to return a read receipt?
Can I use a remote SMTP server with CDONTS.NewMail?
How do I alter the priority / importance of an e-mail message?
How do I prevent my links from wrapping in an e-mail?
How do I put carriage returns into an e-mail?
How do I send e-mail from ASP?
How do I send e-mail from SQL Server?
How do I send e-mail in HTML format?
How do I send e-mail with CDO?
How do I validate an e-mail address?
Should I use form action=mailto: to mail the results of a form?
Where can I get more details about configuring / using CDO?
Why can't ASP handle 80,000 e-mails?
Why do CDONTS messages end up in the badmail folder?
Why do I get 8000900F errors?
Why do I get 80040108 errors?
Why do I get 8004020A errors?
Why do I get 80090020 errors?
Why do I get C00402CE / C00402C7 errors?
Why does CDO.Message give me 8004020F errors?
Why does CDO.Message give me 80040213 errors?
Why does CDO.Message give me 80040222 errors?
Why does my CDONTS mail hang out in the queue or pickup folders?
Why is e-mail to certain domains being rejected?