Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in send mail using java for group of person

 
vijayakumar durai
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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





thanks in advance
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12098
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
vijayakumar durai
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You won't know which emails won't go through when you send them. They could bounce back later for any number of reasons. What you need to do is to catch the bounces and deal with those separately.
 
Paul Clapham
Sheriff
Pie
Posts: 20966
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean that if your list of addressees is "billgates@microsoft.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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic