diff options
Diffstat (limited to 'service/pixelated/adapter/model')
-rw-r--r-- | service/pixelated/adapter/model/mail.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/service/pixelated/adapter/model/mail.py b/service/pixelated/adapter/model/mail.py index 42953064..dfc0ea1c 100644 --- a/service/pixelated/adapter/model/mail.py +++ b/service/pixelated/adapter/model/mail.py @@ -186,6 +186,17 @@ class InputMail(Mail): return mime_multipart.as_string() @staticmethod + def delivery_error_template(delivery_address): + return InputMail.from_dict({ + 'body': "Mail undelivered for %s" % delivery_address, + 'header': { + 'bcc': [], + 'cc': [], + 'subject': "Mail undelivered for %s" % delivery_address + } + }) + + @staticmethod def from_dict(mail_dict): input_mail = InputMail() input_mail.headers = {key.capitalize(): value for key, value in mail_dict.get('header', {}).items()} |