Skip to content

Better admin output for email text and subject. Fixes failures for emails with Subject/From/To fields missing.#5

Merged
coddingtonbear merged 5 commits intocoddingtonbear:masterfrom
buriy:master
Jul 27, 2013
Merged

Better admin output for email text and subject. Fixes failures for emails with Subject/From/To fields missing.#5
coddingtonbear merged 5 commits intocoddingtonbear:masterfrom
buriy:master

Conversation

@buriy
Copy link
Copy Markdown
Contributor

@buriy buriy commented Jul 25, 2013

e.g.:
echo "Hello there" | mail test@yourdomain.com
would result into a missing email subject.

Needs some rework for get_filename() method.
Not tested most of the changes by @Anders.Du : addresses, filename parsing updates and getitem removal.
What works well:
subject parsing, text body parsing, missing fields fixes.

duyu and others added 5 commits July 19, 2013 23:39
  attachments' name, message header, etc.
* Remove overriding for MessageAttachment's __getitem__
  method, so we can call the members directly in django
  templates.

Signed-off-by: Anders.Du <ander.dy@gmail.com>
jhmaddox/django-precompressed#1
("AttributeError: StringIO instance has no attribute 'name'")
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I'm afraid much of this conditional block is handled by email.message.Message.get_payload if you pass it the proper arguments -- http://docs.python.org/2/library/email.message.html#email.message.Message.get_payload -- good catch, though; I should definitely be decoding the payload components.

@coddingtonbear coddingtonbear merged commit d06c64a into coddingtonbear:master Jul 27, 2013
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.

3 participants