-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added DCC data officer in c.c. for DCC projects oot notification
- Loading branch information
1 parent
85480f5
commit 0b3f3d0
Showing
1 changed file
with
8 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -804,6 +804,13 @@ func ootAlert(ipdb pdb.PDB, prj *pdb.Project, info *pdb.DataProjectInfo, lastAle | |
SenderName: alertSender, | ||
} | ||
|
||
// add condituional carbon-copies for every email send to a recipient | ||
cclist := []string{alertCarbonCopy} | ||
|
||
if strings.HasPrefix(info.ProjectID, "24") { | ||
cclist = append(cclist, "[email protected]") | ||
} | ||
|
||
for _, u := range recipients { | ||
|
||
// only apply `alertSkipPI` option if | ||
|
@@ -843,7 +850,7 @@ func ootAlert(ipdb pdb.PDB, prj *pdb.Project, info *pdb.DataProjectInfo, lastAle | |
|
||
if alertDryrun { | ||
log.Infof("[%s] alert %s", info.ProjectID, u.Email) | ||
} else if err := m.SendMail(alertSenderEmail, subject, body, []string{u.Email}, alertCarbonCopy); err != nil { | ||
} else if err := m.SendMail(alertSenderEmail, subject, body, []string{u.Email}, cclist...); err != nil { | ||
log.Errorf("[%s] fail to sent oot alert to %s: %s", info.ProjectID, u.Email, err) | ||
} | ||
|
||
|