-
Notifications
You must be signed in to change notification settings - Fork 5
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
get the name of attachment files without downloading #125
Comments
Found the following information here You have 2 options when it comes to handling attachments. One is that you download the entire raw message (using the "RFC822" fetch item) and then parse it using a separate package such as email.parser in the Python standard library. This takes care of splitting up the raw message into parts and handles much of the low level details for you. The downside of this approach is that it requires you download the entire message, even if you only care about some parts of it. The other approach is to use the IMAP fetch command's abilities to download specific message parts. With this approach you would first fetch the "BODYSTRUCTURE" for a message which gives details of the (often nested) parts of an email on the server. This would then be used to drive fetches of specific parts (e.g. "BODY[3.1]". This is somewhat more complicated but can be much more efficient in terms of bandwidth usage. The relevant parts in the IMAP RFC are https://tools.ietf.org/html/rfc3501#section-6.4.5 and https://tools.ietf.org/html/rfc3501#section-7.4.2. |
also page 73 of this |
fixed by #175 |
https://stackoverflow.com/a/13848096
we could use this to provide a feature of has_attachment() or listing names of attachments
The text was updated successfully, but these errors were encountered: