邮件发送记录增加发送状态

This commit is contained in:
hejinbo
2023-11-06 11:16:54 +08:00
parent d3701b7299
commit f0e9261c22
4 changed files with 56 additions and 24 deletions
@@ -93,7 +93,7 @@ public class EmailOutUtil {
* @param subject 邮件主题
* @param fileList 邮件附件
*/
public void sendEmil(String to, String message, String subject, List<File> fileList, File file) {
public Boolean sendEmil(String to, String message, String subject, List<File> fileList, File file) {
try {
String messageContent = "<html><body><p style=\"font-family: Arial, sans-serif; font-size: 18px;\">"+message+"。</p></body></html>";
MimeBodyPart messageBodyPart = new MimeBodyPart();
@@ -160,8 +160,9 @@ public class EmailOutUtil {
Transport.send(msg);
} catch (Exception e) {
e.printStackTrace();
return Boolean.FALSE;
}
return Boolean.TRUE;
}
/**