use of com.itrus.portal.db.EmailServerExample in project portal by ixinportal.
the class SendEmailImpl method sendEmail.
/**
* 发送邮件 目前支持smtp协议
*
* @param mailContent
* 邮件内容
* @param toEmail
* 接收人
* @param subject
* 邮件主题
* @param isHtml
* 是否为html格式
* @throws MessagingException
*/
public void sendEmail(String mailContent, String[] toEmail, String subject, boolean isHtml) throws MessagingException, Exception {
// 发送邮件
EmailServer emailServer = emailServerService.getEmailServerByExample(new EmailServerExample());
sendEmail(emailServer, mailContent, toEmail, subject, isHtml);
}
use of com.itrus.portal.db.EmailServerExample in project portal by ixinportal.
the class SendEmailImpl method sendEmail.
/**
* 发送邮件加附件(照片)
* @param mailContent
* 邮件内容
* @param toEmail
* 接收人
* @param subject
* 邮件主题
* @param isHtml
* 是否为html格式
* @param porxyMap
* 授权书
* @throws MessagingException
* @throws Exception
*/
public void sendEmail(String mailContent, String[] toEmail, String subject, boolean isHtml, Map<String, File> porxyMap) throws MessagingException, Exception {
// 发送邮件
EmailServer emailServer = emailServerService.getEmailServerByExample(new EmailServerExample());
sendEmailAndPorxy(emailServer, mailContent, toEmail, subject, isHtml, porxyMap);
}
use of com.itrus.portal.db.EmailServerExample in project portal by ixinportal.
the class EmailServerController method details.
// 显示邮箱配置详细信息
@RequestMapping(produces = "text/html")
public String details(Model uiModel) {
try {
EmailServer emailServer = emailServerService.getEmailServerByExample(new EmailServerExample());
if (emailServer == null) {
return "redirect:/mailconfig?form";
}
uiModel.addAttribute("emailServer", emailServer);
} catch (Exception e) {
e.printStackTrace();
uiModel.addAttribute("errMsg", "解密密码失败");
}
return "mailconfig/details";
}
Aggregations