邮件提醒
这里是邮件提醒显示的信息,
/**
* @author Tianhao
*/
@Service("mailservice")
public class MailService {
@Autowired
private SmtpService smtpService;
public void sendTaskMail(String taskMan, String memberEmail, String taskContent) {
String ccviewUrl = "http://www.baidu.com";
String subject = "CCVIEW工单:# " + taskContent;
StringBuffer buffer = new StringBuffer();
buffer.append("<html>\n");
buffer.append("<body>\n");
buffer.append("<body>\n");
buffer.append("<div style=\"border-style:solid;border-width:1px;border-color:black;width:640px;padding:10px;\">\n");
buffer.append("\t <p align=\"center\" style=\"font-size: 26px\">CCVIEW任务工单信息x</p>\n");
buffer.append("\t <p align=\"center\" style=\"font-size: 26px\">CCVIEW Job Informationx</p>\n");
buffer.append("\t\t<hr style=\"border:1 dashed #987cb9\" width=\"92%\" color=\"#987cb9\" size=\"1\"/>\n");
buffer.append("\t\t<p style=\"margin-left:20px\"> 你好:"+ taskMan + "同事:</p>\n");
buffer.append("\t\t<p style=\"margin-left:20px\">来自***平台的任务!</p>\n");
buffer.append("\t\t<p style=\"margin-left:20px;font-weight:bold;\">任务标题:"+ taskContent + "</p>");
buffer.append("\t\t<p style=\"margin-left:20px\">您有一个来自***平台的任务需要处理!</p>\n");
buffer.append("\t\t<p style=\"margin-left:20px\">\n");
buffer.append("\t\t <a style=\"margin-left:40px;margin-top:40px\" href=\""+ ccviewUrl + "\">\n");
buffer.append("\t\t ***平台\n");
buffer.append("\t\t </a>\n\"");
buffer.append("\t\t<p style=\"margin-left:20px\">团队管理 → 任务管理 → 任务清单</p>\n");
buffer.append("\t\t</p>\n");
buffer.append("\t </div>\n");
buffer.append(" </body>\n");
buffer.append("</html>");
smtpService.init();
smtpService.doSendHtmlEmail(subject,buffer.toString(), memberEmail);
}
}