Home All Groups Group Topic Archive Search About

System.Net.Mail.SmtpClient

Author
22 Aug 2006 8:52 PM
V
I am using SmtpClient.Send method to send emails from a windows service
running under LoacalSystem credential. This program does not receive an
exception when the Send method is called for a bogus email address. I am
using my email address as FromAddress. The Host property is referencing a
SMTP server on the network.  I receive a delivery failure email in my Inbox.
How can make it work so that I receive a SmtpFailedRecipientsException when
the target email address is invalid?

Thanks.

Author
23 Aug 2006 2:13 PM
Mike Lowery
"V" <V@discussions.microsoft.com> wrote in message
news:1B8EA9AB-7B78-4DC0-A078-08038C61DBC9@microsoft.com...
>I am using SmtpClient.Send method to send emails from a windows service
> running under LoacalSystem credential. This program does not receive an
> exception when the Send method is called for a bogus email address. I am
> using my email address as FromAddress. The Host property is referencing a
> SMTP server on the network.  I receive a delivery failure email in my Inbox.
> How can make it work so that I receive a SmtpFailedRecipientsException when
> the target email address is invalid?

I don't think you can.  The error is generated by the recipients SMTP server,
not yours.
Author
23 Aug 2006 5:50 PM
V
Thanks. That makes sense.

Show quote
"Mike Lowery" wrote:

>
> "V" <V@discussions.microsoft.com> wrote in message
> news:1B8EA9AB-7B78-4DC0-A078-08038C61DBC9@microsoft.com...
> >I am using SmtpClient.Send method to send emails from a windows service
> > running under LoacalSystem credential. This program does not receive an
> > exception when the Send method is called for a bogus email address. I am
> > using my email address as FromAddress. The Host property is referencing a
> > SMTP server on the network.  I receive a delivery failure email in my Inbox.
> > How can make it work so that I receive a SmtpFailedRecipientsException when
> > the target email address is invalid?
>
> I don't think you can.  The error is generated by the recipients SMTP server,
> not yours.
>
>
>

AddThis Social Bookmark Button