How to send an email to multiple recipients in Spring

You have the choice to use the following 4 methods. I have provided examples of the two methods useful in this case. I have consolidated this information from the commentators below.

helper.setTo(InternetAddress.parse("[email protected],[email protected]"))
helper.setTo(new String[]{"[email protected]", "[email protected]"});

From the Javadoc:

enter image description here

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)