private void setFrom(MailController controller, MimeMessage msg, OptionService os) throws MessagingException { String from = controller.getFrom(); if (StringUtil.isEmpty(from)) { from = os.get(OptionService.OPTION_MAIL_FROM, null); } if (!StringUtil.isEmpty(from)) { msg.setFrom(new InternetAddress(from)); } }
private void setSender(MimeMessage msg, OptionService os) throws MessagingException { String from = os.get(OptionService.OPTION_MAIL_FROM, null); if (!StringUtil.isEmpty(from)) { msg.setSender(new InternetAddress(from)); } }