/** * Given a message and the params, will look in the params for 'mail-from' * and if present, will set it as the 'from' of the message. */ public static void setMailFrom (final Message m, final java.util.Map params) throws MessagingException { final InternetAddress a = getMailFrom(params); if (a != null) m.setFrom(a); }