From 755b1ce420d9a2f915884e132d67447b88ad2223 Mon Sep 17 00:00:00 2001 From: Marius Halden Date: Sun, 12 Apr 2015 03:36:11 +0200 Subject: Get payload for multipart correctly --- push.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'push.py') diff --git a/push.py b/push.py index 1a12f27..27e44a6 100755 --- a/push.py +++ b/push.py @@ -80,8 +80,9 @@ if title is not None and encoding is not None: # Lets at least try to handle mime multipart if mail.is_multipart(): # Try to find something plain text - for payload in mail.walk(): - if payload.get_content_type() == 'text/plain': + for current in mail.walk(): + if current.get_content_type() == 'text/plain': + payload = get_payload(decode=True) break else: # A realy stupid fallback -- cgit v1.2.3