Email using ASP.net

S

srinivas

Hi All,
I have created an ASP.net application(.net framework v1.1) in which I am
using System.web.mail namespace for sending the emails.
If the email ID is wrong or if the destination mail box is full then ASP.net
is not throwing any error.My application is still executing .
But the failure message is coming to the sender's email box.
I want to capture the error thrown by the destination mail server within the
ASP.net application itself.
Is there any way in ASP.net to capture this?
Please help!
Thanks in advance
 
K

Kevin Spencer

ASP.Net uses SMTP, which means that the message is transmitted via an SMTP
server. It is transmitted to the SMTP server of the domain that is
indicated, and unless an exception occurs during transmission, there will be
no error. The email reply that appears in the sender's mail box is a reply
from the server that received the message. In other words, the message was
sent and received. There was no error. Think of it this way. You write a
letter to somebody and put their address on the front of it. You put it in
your mail box and the mailman picks it up and takes it to the local post
office. The zip code is used to send it to the receiving post office, where
it will be sorted and delivered. But the street address has the wrong number
in it, one that does not exist. The receiving post office sends the letter
back to the return address. However, no problems occurred in the process of
the mail man picking up the letter, taking it to the local post office, or
during the process of the local post office sending it to the remote post
office. The "Incorrect address" mail reply is not sent to the local post
office. It is sent to the sender of the mail. The local post office has no
idea if the letter was delivered to any final destination. It only knows
that it was successfully delivered to the remote post office.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP
 
P

PokerMan

*clap clap* now thats a great answer to a post. If only everyone answered
with such clarity.
 
B

Braulio Diez

Mark and Kevin are right, the only workaround I see is...

- Create an account just for sending that automated emails.
- Send the emails (no way to capture that error).
- Check:
- Manually which emails failed (checking the received items account).
- Automatically read from the POP3 queue and check which message
where returned (not straight forward but possible to implement, there are
plenty of thirdparty components available, even free ones....).

Good Luck
Braulio

/// ------------------------------
/// Braulio Diez
///
/// http://www.tipsdotnet.com
/// ------------------------------
 
S

srinivas

Thanks all! Thanks for the info.

Braulio Diez said:
Mark and Kevin are right, the only workaround I see is...

- Create an account just for sending that automated emails.
- Send the emails (no way to capture that error).
- Check:
- Manually which emails failed (checking the received items account).
- Automatically read from the POP3 queue and check which message
where returned (not straight forward but possible to implement, there are
plenty of thirdparty components available, even free ones....).

Good Luck
Braulio

/// ------------------------------
/// Braulio Diez
///
/// http://www.tipsdotnet.com
/// ------------------------------
 

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
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top