Allows specifying the sender's display name as part of the from email address,
without requiring use of the DjrillMessage class:
send_mail('Subject', 'Message', 'From Name <from@example.com>',
['Recipient #1 <to1@example.com>', 'to2@example.com'])
(This matches the behavior of Django's default SMTP backend.)
Cherry-picked from:
medmunds/Djrill@46cd5c9d: Support "realname <email>" sender address
medmunds/Djrill@cd4e57cc: Support "realname <email>" sender address - fix for using DjrillMessage
medmunds/Djrill@16f8efc9: Add tests for "Display Name <email@example.com>" addresses
Includes type-checking on alternative message part, and switches
to ValueError (rather than ImproperlyConfigured) for unacceptable
alternatives.
[Also fixes bug where fail_silently=True wasn't respected.]
Cherry-picked from: medmunds/Djrill@faf53a1a0
(and parts of medmunds/Djrill@62d48c5f)
Cherry-picked from:
8c26807a - Add runtests.py for testing separately from other Django apps
cd8504b1 - Make tests compatible with setuptools
4ac65b78 - Set up testing on the backend API calls, using mock