• Post Reply Bookmark Topic Watch Topic
  • New Topic

javax.mail.internet.AddressException: Missing local name in string  RSS feed

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

I am sending mails in bulk quantity with JavaMail to our existing and new users but if there is any error in the data like following:

Cp_Email.java javax.mail.internet.AddressException: Missing local name in string ``@lalanisteelusa.com''

Then it stops sending from onward that point. I am looking for advice that if any error happens in sending email then this mail address should be skipped and continue sending

Best regards
 
Rob Spoor
Sheriff
Posts: 20903
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Catch your exceptions (preferably as limited as possible; e.g. only catch AddressException) within the loop instead of outside it:
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Thanks for your prompt favorable reply.

Is that correct approach?



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

still getting the same error

Best regards
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course you will - the email address shown in your first post is invalid. What Rob showed you -and what you asked about- is how to catch the exception and continue processing. That should now be happening.
 
Radovan Vukovic
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can always validate address (or addresses) before you actual send message
 
Paul Okeke
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also make sure that your have the right exception in your catch
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!