Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What represents MessagePart::Multipart #10

Closed
atezet opened this issue Dec 16, 2021 · 5 comments
Closed

What represents MessagePart::Multipart #10

atezet opened this issue Dec 16, 2021 · 5 comments

Comments

@atezet
Copy link

atezet commented Dec 16, 2021

I noticed that in your most recent release (0.3.1) you added a variant of Messagepart: Multipart and I was wondering how I should handle this when rendering attachments. Is there a test case for this?

@mdecimus
Copy link
Member

The MessagePart:Multipart type stores the raw headers of a nested MIME multipart and are never returned by the Message::get_attachments() iterator, so you can safely ignore them. The MessagePart:Multipart type is only used when accessing the raw MIME structure of the message, which is available in Message::structure field. In future releases a method will be added to explore the raw body structure of messages.

@atezet
Copy link
Author

atezet commented Dec 16, 2021

Thank you! I saw that in 0.4.0 you re-added MessagePart::InlineBinary, can that one also be ignored when rendering attachments? I'm currently only rendering the text_body and all attachments, but I was wondering if anything (other than the HTML markup) would get lost that way.

@mdecimus
Copy link
Member

Inline binaries are embeddable content (such as images or videos) which are part of an HTML or text body. It is up to you if you want to render these as attachments, but most email clients do not consider these attachments since they are part of the message body. Hope it helps!

@atezet
Copy link
Author

atezet commented Dec 16, 2021

Well, I was wondering if these'll show up in Message::get_attachments or not

@mdecimus
Copy link
Member

Yes, they will show up in get_attachments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants