This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes JavaMail sent to multiple recipients Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JavaMail sent to multiple recipients" Watch "JavaMail sent to multiple recipients" New topic
Author

JavaMail sent to multiple recipients

Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
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

Joined: Oct 27, 2005
Posts: 19541
    
  16

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
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

Joined: Oct 27, 2005
Posts: 19541
    
  16

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))?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaMail sent to multiple recipients
 
Similar Threads
Java Mail Problem
Sending mail thru JAVA
How to handle relay problems in JavaMail
send email
SendFailedException with SMTP authentication