Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.mail.SendFailedException: Invalid Addresses; nested exception is: com.sun.mail.smtp.SMTPAddres

 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,



The above code works fine but when there is any error it stops and not sending to the rest of the listed emails.

I want if there is any error with any email address then it ignore this email address and send email message to the rest of the emails. Please advise

Thanks in anticipation
 
Wayan Saryada
Ranch Hand
Posts: 105
IntelliJ IDE MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is that the correct properties? I think the property should be something like "mail.host" or "mail.smtp.host" to define the SMTP server address.
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its working fine for me
 
Paul Clapham
Sheriff
Pie
Posts: 20771
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Farakh khan wrote:I want if there is any error with any email address then it ignore this email address and send email message to the rest of the emails. Please advise


Sure, I think that's one of the documented properties. Check here for a complete list of SMTP-related properties: https://javamail.java.net/nonav/docs/api/com/sun/mail/smtp/package-summary.html
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean: SMTPAddressSucceededException: This exception is chained off a SendFailedException when the mail.smtp.reportsuccess property is true.


Is that you mean?

Best regards
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks from the bottom of my heart
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic