Home All Groups Group Topic Archive Search About
Author
5 Oct 2006 4:24 PM
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

Author
5 Oct 2006 4:49 PM
Aaron Bertrand [SQL Server MVP]
Doesn't your SMTP server have logging capabilities?


Show quoteHide quote
"Ted Boyd" <screame***@hotmail.com> wrote in message
news:u13voqJ6GHA.348@TK2MSFTNGP02.phx.gbl...
>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
>
Are all your drivers up to date? click for free checkup

Author
5 Oct 2006 5:00 PM
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?



Show quoteHide quote
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
news:On7pH4J6GHA.5108@TK2MSFTNGP03.phx.gbl...
> Doesn't your SMTP server have logging capabilities?
>
>
> "Ted Boyd" <screame***@hotmail.com> wrote in message
> news:u13voqJ6GHA.348@TK2MSFTNGP02.phx.gbl...
>>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
>>
>
>
Author
5 Oct 2006 5:45 PM
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?
Author
5 Oct 2006 5:55 PM
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.
Author
5 Oct 2006 6:34 PM
Aaron Bertrand [SQL Server MVP]
>> 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.

I guess the analogy was lost somewhere.

If SMTP can't send e-mails, it can't e-mail you to tell you that.
Author
5 Oct 2006 9:42 PM
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.
Author
5 Oct 2006 10:31 PM
Anthony Jones
Show quote Hide quote
"Ted Boyd" <screame***@hotmail.com> wrote in message
news:OyhhUcM6GHA.4608@TK2MSFTNGP05.phx.gbl...
> >> 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.
>
>

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.
Author
6 Oct 2006 2:18 AM
Ted Boyd
Show quote Hide quote
> 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
Author
6 Oct 2006 7:55 AM
Anthony Jones
Show quote Hide quote
"Anthony Jones" <A**@yadayadayada.com> wrote in message
news:OSF1T4M6GHA.4692@TK2MSFTNGP04.phx.gbl...
>
> "Ted Boyd" <screame***@hotmail.com> wrote in message
> news:OyhhUcM6GHA.4608@TK2MSFTNGP05.phx.gbl...
> > >> 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.
> >
> >
>
> 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



Show quoteHide quote
>
> Message.Fields(cdoDispositionNotificationTo) = NoteTo
> Message.DSNOptions = cdoDSNFailure or cdoDSNDelay
> Message.Fields.Update
>
> Anthony.
>
>

Bookmark and Share