class MailAddressUtils {

    public static InternetAddress[] toInternetAddressArray(List<MailAddress> mailAddresses) {
        return streamOfInternetAddress(mailAddresses)
            .toArray(InternetAddress[]::new);
    }

}