Exemplo n.º 1
0
 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));
   }
 }
Exemplo n.º 2
0
 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));
   }
 }