my requirment is i want to send the mail for some group of person .suppose if user given one mail id is wrong.the mail is not going for other person.i know how to get the wrong mail ids and display to user mail id is wrong and send mail to other person.i am using smtp for sending mail .if you have code give to me
Nobody here is going to 'give you the code'. That's not what we do here.
People will bend over backwards to help you write the code yourself, answer any java-related questions you may have, or point out mistakes if you post your code. Note that I don't mean 'post 2000 lines of code and we'll debug it', but more 'here is the relevant 10-20 lines of code, it does X when I think it should be doing Y'.
You may want to read some of these, but specifically this, this, this and this. [ November 20, 2008: Message edited by: fred rosenberger ]
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Joined: Aug 18, 2008
if somebody give invalid address .. the mail is not going for other person
can anybody tell how to catch invalid address and display the mail is not going for this person.
my coding is
[ UD: fixed CODE tag ] [ November 20, 2008: Message edited by: Ulf Dittmer ]
You mean that if your list of addressees is "email@example.com" (valid) and "bzzt#####?" (not valid) then the message doesn't get sent to Mr. Gates?
If that's the case then maybe you'll have to change something in that SmtpClient class. Or maybe it has a parameter which allows it to be told not to do that. Without knowing anything about that class, though, it's hard to say anything useful.
I know there's a system property in JavaMail which you can set to send a message to the valid addresses even if there are some invalid addresses, but that may not be helpful if your SmtpClient class doesn't use JavaMail.