BCC Sender so sender has a copy of the email that was sent out (#384)

This commit is contained in:
Kerem Yilmaz 2024-05-28 21:53:59 -07:00 committed by GitHub
parent bfa477a262
commit 6fa5336adf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -814,6 +814,7 @@ class SendEmailBlock(Block):
msg = EmailMessage()
msg["Subject"] = self.subject + f" - Workflow Run ID: {workflow_run_id}"
msg["To"] = ", ".join(self.recipients)
msg["BCC"] = self.sender # BCC the sender so there is a record of the email being sent
msg["From"] = self.sender
if self.body and workflow_run_context.has_parameter(self.body) and workflow_run_context.has_value(self.body):
# We're purposely not decrypting the body parameter value here because we don't want to expose secrets