Skip to content

Commit

Permalink
tests: compatibility of date and attachments
Browse files Browse the repository at this point in the history
Signed-off-by: Jacopo Notarstefano <[email protected]>
  • Loading branch information
jacquerie committed Feb 24, 2016
1 parent d18d0b1 commit 7a44592
Show file tree
Hide file tree
Showing 4 changed files with 1,026 additions and 4 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ recursive-include examples *.py
recursive-include misc *.py
recursive-include misc *.rst
recursive-include tests *.py
recursive-include tests *.svg
7 changes: 6 additions & 1 deletion invenio_mail/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@

@shared_task(base=RequestContextTask)
def send_email(data):
"""Celery task to send security email."""
"""Celery task to send emails.
.. warning:: Due to an incompatibility between MessagePack and Message,
support for attachments and dates is limited. Consult the
tests for details.
"""
msg = Message()
msg.__dict__.update(data)
current_app.extensions['mail'].send(msg)
Loading

0 comments on commit 7a44592

Please sign in to comment.