what if email address is wrong when sending email ?


 Hi Guys,
 Is there any way to get error info when sending email if to or cc email address is wrong? I am using asp.net with c# and using local SMTP server.
 Thanks in advance.
 
Justin
 
0
justindongqiang
9/19/2007 5:16:29 PM
📁 asp.net.getting-started
📃 91979 articles.
⭐ 4 followers.

💬 6 Replies
👁️‍🗨️ 905 Views



define "wrong".
If you mean it's not a valid FORMAT, meaning no @ and no "." then yes... you can.
If you mean that the account doesn't existing...then Nope.... you can't.

0
Curt_C
9/19/2007 5:25:36 PM

You can validate the email address to make sure that it is in a valid format, but your ASP.NET application only handles sending the email to the SMTP server.  You can't get an error if the email bounces back because the application never sees anything from the email after it successfully sends it to the server.

Life is like a box of chocolates. A cheap, thoughtless, perfunctory gift that nobody ever asks for. Unreturnable because all you get back is another box of chocolates. So you're stuck with this undefinable whipped mint crap that you mindlessly wolf down when there's nothing else left to eat. Sure, once in a while there's a Peanut Butter Cup or an English Toffee. But they're gone too fast and the taste is... fleeting. So you end up with nothing but broken bits filled with hardened jelly and teeth-shattering nuts. And if you're desperate enough to eat those, all you got left is an empty box... filled with useless brown paper wrappers.
0
Gipionocheiyort
9/19/2007 5:27:58 PM

 I mean it is valid format but it does not exist.
0
justindongqiang
9/19/2007 5:40:08 PM

 once your code sends the email to a SMTP server, it's out of your hands.
What happens if you open Outlook and address an email incorrectly?
Depending on the SMTP server , you may ( or may not) receive an email stating something like "unable to deliver...."
same thing happens with your ASP.Net email.
If an email can't be delivered, you may (or may not) receive an error in the inbox of the "From:" address...

Hope That Helps
All that wander, are not lost...
What were we talkin bout
0
uncleb
9/19/2007 6:13:20 PM

justindongqiang:

 I mean it is valid format but it does not exist.


Then no...you can not verify it....just think if you could....a SPAMmer could just pick a domain and use a simple algorithm to get every email address on that domain and put it in a list.... .....

0
Curt_C
9/19/2007 6:14:01 PM

thank you for your answer... 
0
justindongqiang
9/19/2007 6:39:07 PM
Reply: