SbloodyS commented on code in PR #16529:
URL:
https://github.com/apache/dolphinscheduler/pull/16529#discussion_r1733750157
##########
dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-email/src/main/java/org/apache/dolphinscheduler/plugin/alert/email/MailSender.java:
##########
@@ -378,13 +383,41 @@ private AlertResult getStringObjectMap(String title,
String content, AlertResult
// send
email.setDebug(true);
- email.send();
-
+ email.buildMimeMessage();
+ sendMail(email.getMimeMessage(), email.getMailSession());
alertResult.setSuccess(true);
return alertResult;
}
+ /**
+ * send mail with validAddresses retry
+ *
+ * @param mimeMessage the message
+ * @param session connectSession
+ */
+ private void sendMail(MimeMessage mimeMessage, Session session) throws
MessagingException {
Review Comment:
Please add some unit-test for this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]