add 邮件发送日志

This commit is contained in:
lijiarao
2024-07-09 14:57:59 +08:00
parent 88c0115629
commit b0bcd0259d
2 changed files with 5 additions and 1 deletions
@@ -5,6 +5,7 @@ import com.jero.common.util.SpringContextUtils;
import com.jero.common.util.oConvertUtils;
import com.jero.config.StaticConfig;
import com.jero.modules.message.handle.ISendMsgHandle;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -20,7 +21,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;
@Slf4j
public class EmailSendMsgHandle implements ISendMsgHandle {
static String emailFrom;
private String email;
@@ -94,6 +95,7 @@ public class EmailSendMsgHandle implements ISendMsgHandle {
// helper.addAttachment(attachmentsMailNameDispose(uploadEXECL), file);
// helper.addAttachment(attachmentsMailNameDispose(uploadCAD), file);
mailSender.send(message);
log.info("发送邮件成功");
} catch (MessagingException e) {
e.printStackTrace();
}
@@ -178,6 +180,7 @@ public class EmailSendMsgHandle implements ISendMsgHandle {
}
}
mailSender.send(message);
log.info("发送邮件和文件成功");
}
}
}catch (MessagingException e) {