Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaMail sent to multiple recipients

 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys

Could anyone tell me why sending emails to multiple accounst is throwing 'Invalid Address' errors, but when I send to a singular email, the same code works?

Here is my code for multiple emails:


Here is my code for a simgle email:
 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps one of the email addresses is invalid. Try with one at a time to figure out if this is the case, and if so which one.
 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cheers for that, that's sort of half right. It is saying one of the email accounts is invalid (a Yahoo! account), it's just a little weird because the address IS valid, it's my email and I use it all the time

I'll keep investigating
 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you turn on debugging on the Session to see where it's failing? And perhaps post the stack trace (after anonymizing the email address(es))?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic