System.Net.Mail.SmtpClient

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
V said:
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.
 
Back
Top