修改邮件功能

master
bynt 1 year ago
parent 73a26a2e41
commit 19c8b1004f

@ -78,6 +78,7 @@ public class MailSourceTask {
/**
*
*/
@SneakyThrows
@Scheduled(cron = "0 0/10 * * * ? ")
@Transactional(rollbackFor = Exception.class)
public void receiveMail() {
@ -85,7 +86,6 @@ public class MailSourceTask {
List<Message> list = MailUtil.readMailByIMAP
(deliveryProperties.getEmailAddress(), deliveryProperties.getEmailPassword());
if (CollUtil.isNotEmpty(list)) {
try {
for (Message message : list) {
// 获取未读的邮件内容 且与之对应
if (deliveryProperties.getToEmailAddress().equalsIgnoreCase
@ -169,10 +169,6 @@ public class MailSourceTask {
}
}
}
} catch (Exception e) {
log.error("=================== the receive mail error message as {} ===========", e.getMessage());
throw new BadRequestException("接收邮件失败");
}
}
}

Loading…
Cancel
Save