Multiple Email Messages
I am writing a web application that sends an email based on form data, and I want the user to be able to enter any number of email addresses into the form. My code is working to send out single email messages. However, I don't know how to send multiple email addresses at once. I think the problem is that I don't know how to format multiple "to" addresses.
For example:
String to_address ="foo@bar.com";// sends a single email message
String to_address ="foo@bar.com, hello@world.com";// fails
String to_address ="foo@bar.com; hello@world.com";// fails
I can duplicate the functionality by parsing the to_address input into an ArrayList and calling the code to send the email in a for loop that sends the emails separately to each of the elements (email addresses) in the ArrayList, but if I knew how to format the email addresses that would be more elegant.

