Allow one-off email sending to select the reply-to address

This commit is contained in:
chrisw
2017-10-16 16:35:35 +01:00
parent 7809a70cf3
commit e149d0eb91
11 changed files with 350 additions and 14 deletions

View File

@@ -54,12 +54,14 @@ class NotificationApiClient(NotifyAdminAPIClient):
params=params
)
def send_notification(self, service_id, *, template_id, recipient, personalisation):
def send_notification(self, service_id, *, template_id, recipient, personalisation, sender_id):
data = {
'template_id': template_id,
'to': recipient,
'personalisation': personalisation,
}
if sender_id:
data['sender_id'] = sender_id
data = _attach_current_user(data)
return self.post(url='/service/{}/send-notification'.format(service_id), data=data)