SMTP

T

Ted Boyd

I have an ASP page that sends email using CDOSYS. If there is any type of
failure that causes the email not to be sent, I don't have any way of
knowing it. Is there any email component that will notify me or log the
failure? Ideas?

Thanks
 
T

Ted Boyd

Yes, but the boss wants to be notified of every failure, he doesn't want to
glean through log files to learn of the failure. Is there such an animal?
 
A

Aaron Bertrand [SQL Server MVP]

Yes, but the boss wants to be notified of every failure, he doesn't want
to glean through log files to learn of the failure. Is there such an
animal?

So, you want the SMTP server to e-mail you when it can't send an e-mail?
Isn't this like driving your car to the mechanic's when it won't start?
 
T

Ted Boyd

So, you want the SMTP server to e-mail you when it can't send an e-mail?
Isn't this like driving your car to the mechanic's when it won't start?


Yes, I suppose it is. I need the mechanic to tell me the car is broken.
 
A

Aaron Bertrand [SQL Server MVP]

So, you want the SMTP server to e-mail you when it can't send an e-mail?
Yes, I suppose it is. I need the mechanic to tell me the car is broken.

I guess the analogy was lost somewhere.

If SMTP can't send e-mails, it can't e-mail you to tell you that.
 
T

Ted Boyd

Yes, I suppose it is. I need the mechanic to tell me the car is broken.
I guess the analogy was lost somewhere.

If SMTP can't send e-mails, it can't e-mail you to tell you that.


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.
 
A

Anthony Jones

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.
 
T

Ted Boyd

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.



Anthony, thank you for your insight. It's information presented in this
manner that I can take back to the boss, then we'll all have a better
understanding of what solution we're looking for.

All my best,
Ted
 
A

Anthony Jones

Anthony Jones said:
email

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

oops!

Const cdoDSNDelay = 8
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,139
Messages
2,570,805
Members
47,351
Latest member
LolaD32479

Latest Threads

Top