Ted Boyd said:
I guess I'm not making myself clear. I don't care if it sends me an email or
a telegram, I need something that will tell me that an email was not sent
from a form on a web page. I don't need to know if the emails were sent
successfully; only if not.
If it doesn't exist, that's what I'll tell the boss. If it does, all I have
to do is tell him how much it costs.
There are basically three points of failure.
1) The call to send on the CDO object fails because the server objects to
something or is having a problem. An error is raised in script so you will
need to trap and deal with this error in someway.
2) The send succeeds but subsequently the SMTP server is having a problem
and can't get this email or potentially any emails out. This is tricky to
handle the only sure way is to check event logs to see if your SMTP server
is happy.
3) The email cannot be forwarded successfully because of problems further
down the line. The SMTP server will usually give up after some time and
return the email to the disposition notification address which is usually
the senders address but can be set to a different address.
My guess is what you are after is to set the disposition address to
something where you collect the most common failures.
Const cdoDSNFailure = 2
Const cdoDSNDelay = 2
Message.Fields(cdoDispositionNotificationTo) = NoteTo
Message.DSNOptions = cdoDSNFailure or cdoDSNDelay
Message.Fields.Update
Anthony.