Class Mails
java.lang.Object
ch.tocco.nice2.messaging.mail.api.Mails
-
Method Summary
Modifier and TypeMethodDescriptionstatic List
<jakarta.mail.internet.InternetAddress> toInternetAddress
(String addresses, org.slf4j.Logger log) Convert a String of email addresses to a List of InternetAddress.
-
Method Details
-
toInternetAddress
public static List<jakarta.mail.internet.InternetAddress> toInternetAddress(String addresses, org.slf4j.Logger log) throws jakarta.mail.internet.AddressException Convert a String of email addresses to a List of InternetAddress. Extracts both address and personal information. Addresses may be separated by any of the following characters: '\n', ',', ';'- Parameters:
addresses
- a string containing a number of email addresseslog
- for logging- Returns:
- a List of InternetAddresses
- Throws:
jakarta.mail.internet.AddressException
- - thrown if any of the email addresses are invalid
-