how to send message to mailing list with apache commons?

I am working on an application to send emails with javafx and apache mail commons, but it throws and error when i try to send the message.

Caused by: javax.mail.internet.AddressException: Illegal address in

string `` ''

at javax.mail.internet.InternetAddress.(

at org.apache.commons.mail.Email.createInternetAddress(

... 59 more

Anyways i noticed when i initialize the array of strings with my recipients it sends it correctly, but if i take them from the database it throws the error i wrote above.

The way it works.

HtmlEmail email = new HtmlEmail();


String[] emails = {"", ""}


The way it doesn't work

HtmlEmail email = new HtmlEmail();


String[] emails...

Read More »

By: StackOverFlow - Tuesday, 13 March

Related Posts