You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/07/25 18:50:18 UTC

[GitHub] [incubator-pinot] xiaohui-sun commented on a change in pull request #4470: [TE] Include admin recipients in every email alert (cc address)

xiaohui-sun commented on a change in pull request #4470: [TE] Include admin recipients in every email alert (cc address)
URL: https://github.com/apache/incubator-pinot/pull/4470#discussion_r307448699
 
 

 ##########
 File path: thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/alert/scheme/DetectionEmailAlerter.java
 ##########
 @@ -198,15 +202,15 @@ private void sendEmail(DetectionAlertFilterRecipients recipients, Set<MergedAnom
         new EmailContentFormatterContext());
 
     HtmlEmail email = emailEntity.getContent();
+    email.setSubject(emailEntity.getSubject());
     email.setFrom(this.config.getFrom());
     email.setTo(AlertUtils.toAddress(recipients.getTo()));
-    email.setSubject(emailEntity.getSubject());
-    if (CollectionUtils.isNotEmpty(recipients.getCc())) {
-      email.setCc(AlertUtils.toAddress(recipients.getCc()));
-    }
-    if (CollectionUtils.isNotEmpty(recipients.getBcc())) {
-      email.setBcc(AlertUtils.toAddress(recipients.getBcc()));
+    if (recipients.getCc() == null) {
 
 Review comment:
   if Cc() is mandatory then it should get initialized as empty set in constructor.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org