You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I had received an Email, that has two parts:
text/plain
message/rfc822 with Content-Disposition: attachment
The message/rfc822 contained an html email generated by 'Office Communicator conversation history archiver'.
What was supposed to happen (and happens in Outlook Web App):
text/plain is used as the message body
An attachment EML is created (with the filename being set to the contained emails Subject)
What actually happened:
text/plain part was discarded
message/rfc822 had the contained text/html part extracted and used as the msg.body
A 0 byte attachment named 'Unnamed Attachment' was created
The Problem seems to be with the usage of walk().
Going with a single, standard flanker run (for part in msg.parts: [...]) yields the expected two messages.
Using for part in msg.walk(with_self=msg.content_type.is_singlepart()): yields three messages -- the text/html one has been extracted.
The following zip contains the python scripts and example message that illustrate the issue: nylas.zip
Best Regards,
Thorben
The text was updated successfully, but these errors were encountered:
Hi all,
Today I had received an Email, that has two parts:
text/plain
message/rfc822
withContent-Disposition: attachment
The
message/rfc822
contained an html email generated by 'Office Communicator conversation history archiver'.What was supposed to happen (and happens in Outlook Web App):
text/plain
is used as the message bodyWhat actually happened:
text/plain
part was discardedmessage/rfc822
had the containedtext/html
part extracted and used as the msg.bodyThe Problem seems to be with the usage of
walk()
.Going with a single, standard flanker run (
for part in msg.parts: [...]
) yields the expected two messages.Using
for part in msg.walk(with_self=msg.content_type.is_singlepart()):
yields three messages -- thetext/html
one has been extracted.The following zip contains the python scripts and example message that illustrate the issue:
nylas.zip
Best Regards,
Thorben
The text was updated successfully, but these errors were encountered: