Skip to content

Commit 83278ba

Browse files
committed
One notif. addressee – no BCC anonimization needed
1 parent 3811ff7 commit 83278ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

notifications/notification.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ def send_notification(subject, recipients, html, mailtype="", files=None):
139139
"TemplateName": "",
140140
"TemplateLanguage": "",
141141
}
142+
if len(to_addresses) == 1:
143+
payload["ToAsBase64"] = payload["BccAsBase64"] # if 1 addressee, no BCC anonimization needed.
144+
payload["BccAsBase64"] = ""
142145

143146
# The response contains the GUID (res.text)
144147
res = requests.post(settings.EMAIL_API_ENDPOINT, json=payload)

0 commit comments

Comments
 (0)