bbottema / simple-java-mail

Simple API, Complex Emails (Jakarta Mail smtp wrapper)

Home Page:http://www.simplejavamail.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New Feature: More robust support for adding collections of recipients

bbottema opened this issue · comments

Currently the EmailBuilder does not support adding a list of recipients either as collection of Recipient or as comma/semicolon separated list of address.

Also the from and replyTo builder methods should support whole Recipient objects instead of just name and email address.

Added API:

Email email = new EmailBuilder()
   .to("to1@candyshop.org;to2@candyshop.org,to3@candyshop.org")
   .cc("cc1@candyshop.org;cc2@candyshop.org,cc3@candyshop.org")
   .bcc("bcc1@candyshop.org;bcc2@candyshop.org,bcc3@candyshop.org")
   .build();

One or more addresses without names allowed separated by comma or semicolon. Similar addition for 1 from and replyTo (but for single only addresses).

Released in v4.2.0.