예제 #1
0
 // 发送文本信息
 private static Boolean sendText() {
   MailContent mailInfo = new MailContent();
   mailInfo.setMailServerHost(mailServerHost);
   mailInfo.setMailServerPort(mailServerPort);
   mailInfo.setValidate(true);
   mailInfo.setUserName(fromMail);
   mailInfo.setPassword(fromMailPasswd);
   mailInfo.setFromAddress(fromMail);
   mailInfo.setToAddress(toMail);
   mailInfo.setNick(nick4);
   mailInfo.setSubject("文本类信息");
   mailInfo.setContent("本次验证码:【1597986】,非本人操作,请忽略!");
   Boolean result = MailSender.sendTextMail(mailInfo);
   return result;
 }