From 911f38a1489cf170aae092ced0cab2861cc7e2d9 Mon Sep 17 00:00:00 2001 From: Michele Capra Date: Tue, 4 Feb 2014 09:18:31 +0100 Subject: [PATCH] Fixed attachment deserialisation Using the old version with attachments would result in a 403 error (Incompatible JSON) due to the wrong json deserialisation --- postmark/backends.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postmark/backends.py b/postmark/backends.py index 598f47f..9ad332d 100755 --- a/postmark/backends.py +++ b/postmark/backends.py @@ -120,7 +120,7 @@ def __init__(self, message, fail_silently=False): if message.attachments and isinstance(message.attachments, list): if len(message.attachments): - message_dict["Attachments"] = message.attachments + message_dict["Attachments"] =[{"Name": x[0], "Content": x[1], "ContentType":x[2]} for x in message.attachments] except: if fail_silently: