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

Encoding and mailbox attrs #35

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Conversation

Neamar
Copy link

@Neamar Neamar commented Mar 10, 2014

This is a "small" yet useful PR, with several features:

  • Allow for complex, custom IMAP queries using new custom_query parameter
  • Store mailbox attributes. This is better for i18n, since "All Mail" only exists on english GMail (and the only way to retrieve the "all mail" name is to look for "\All" in the attributes)
  • Parse from and to headers (quoted printable content)
  • Encode body and text from mail_encoding to unicode

Sorry, should have broken this into several smaller PR.

@Neamar
Copy link
Author

Neamar commented May 28, 2014

EDIT: this has grown of its own to handle all special cases i kept seeing. This may not be good to merge now. The choice is yours.

self.to = self.message['to']
self.fr = self.message['from']
self.delivered_to = self.message['delivered_to']
def to_unicode(value, charset):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why duplicate make a duplicate function that just calls try_parse?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proboaby some leftover from previous code. Nicely spotted, removing that!

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

Successfully merging this pull request may close these issues.

2 participants