You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/07/01 02:47:22 UTC

[GitHub] [dolphinscheduler] ruanwenjun commented on a diff in pull request #10721: [fix-10698]fail to send email, when user don't enable smtp auth

ruanwenjun commented on code in PR #10721:
URL: https://github.com/apache/dolphinscheduler/pull/10721#discussion_r911573922


##########
dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-email/src/main/java/org/apache/dolphinscheduler/plugin/alert/email/MailSender.java:
##########
@@ -105,20 +105,29 @@ public MailSender(Map<String, String> config) {
 
         enableSmtpAuth = config.get(MailParamsConstants.NAME_MAIL_SMTP_AUTH);
 
-        mailUser = config.get(MailParamsConstants.NAME_MAIL_USER);
-        requireNonNull(mailUser, MailParamsConstants.NAME_MAIL_USER + mustNotNull);
+        if (Boolean.TRUE.toString().equalsIgnoreCase(enableSmtpAuth)) {

Review Comment:
   Yes, this is unsafe, but I think we can support this. In my knowledge, DS should directly use the email protocol to send mail, if the mail server/protocol support send/receive mail without password, then we also need to support 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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org