Click here to Skip to main content
15,846,346 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hii , \

I want to write multiple catch , one includes something , that if Mailfrom is wrong i want to enter into that exception block. What is the exception for this type

What i actually wanted to do is .. if in case my From mail is not working i send the email using other alternative so that mail continues to work .. How can i do that
Updated 19-May-14 2:10am
dan!sh 19-May-14 5:47am    
More details. What is MailFrom? Post some relevant bit of code.

1 solution

add a catch for rhe Exception class, run a test ti generate the exception, and inspect the exception caught. This will tell you what is being thrown.
Share this answer
Torakami 19-May-14 6:37am    
Yehh ... May b i need to do that
Torakami 19-May-14 6:52am    
But How to generate exception for MailFrom ... I entered wrong Frm Email in web.config ,, still it didnt give me any exception ..
NeverJustHere 19-May-14 8:36am    
Then maybe it reports errors without using an exception. You should read the documentation for the mail library you are using.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900