use of com.kyj.fx.voeditor.visual.framework.mail.Mailer in project Gargoyle by callakrsos.
the class MailUtil method sendMail.
/**
* 메일전송
*
* @Date 2015. 9. 13.
* @param mail
* 메일을 보내기 위한 정보가 담긴 객체
* @param mailContent
* 메일템플릿안에 들어갈 내용이 담기는 정보.
* @throws Exception
* @User KYJ
*/
public static boolean sendMail(List<Mail> mails, Map<String, Object> mailContent) throws Exception {
try {
Mailer bean = BeanUtil.getBean("mailer", Mailer.class);
VelocityContext merge = toVelocityContext(mailContent);
SenderMailInfo sender = BeanUtil.getBean("mailSenderInfo", SenderMailInfo.class);
bean.sendMail(sender, mails, merge);
} catch (Exception e) {
LOGGER.error(ValueUtil.toString(e));
return false;
}
return true;
}
use of com.kyj.fx.voeditor.visual.framework.mail.Mailer in project Gargoyle by callakrsos.
the class MailUtil method sendMail.
/**
* 메일전송
*
* @Date 2015. 9. 13.
* @param mail
* 메일을 보내기 위한 정보가 담긴 객체
* @param mailContent
* 메일템플릿안에 들어갈 내용이 담기는 정보.
* @throws Exception
* @User KYJ
*/
public static boolean sendMail(SenderMailInfo sender, Mail mail, Map<String, Object> mailContent) throws Exception {
try {
Mailer bean = BeanUtil.getBean("mailer", Mailer.class);
VelocityContext merge = toVelocityContext(mailContent);
bean.sendMail(sender, mail, merge);
} catch (Exception e) {
LOGGER.error(ValueUtil.toString(e));
return false;
}
return true;
}
Aggregations