diff options
author | Marius Halden <marius.h@lden.org> | 2015-04-12 03:36:11 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2015-04-12 03:36:11 +0200 |
commit | 755b1ce420d9a2f915884e132d67447b88ad2223 (patch) | |
tree | 234bac20c6a2f9ef406247e5cf6593ca9bd7b78b /push.py | |
parent | d8c0a39672c14da9240b8dfc97abcf5605d2ebcb (diff) | |
download | email2push-755b1ce420d9a2f915884e132d67447b88ad2223.tar.gz email2push-755b1ce420d9a2f915884e132d67447b88ad2223.tar.bz2 email2push-755b1ce420d9a2f915884e132d67447b88ad2223.tar.xz |
Get payload for multipart correctly
Diffstat (limited to 'push.py')
-rwxr-xr-x | push.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |