Commit Graph

27 Commits

Author SHA1 Message Date
medmunds
8f9afdff7e Move MANDRILL_API_URL to package root (out of backend) 2013-01-11 17:34:17 -08:00
medmunds
ad4b9f38ff Raise NotSupportedByMandrillError for unsupported attachment mimetypes. 2013-01-11 17:26:09 -08:00
medmunds
18d27fdb21 Exception cleanup
Introduce djrill.NotSupportedByMandrillError for unsupported functionality (previously used generic ValueError).
Change to djrill.MandrillAPIError, derived from requests.HTTPError, for API error responses (previously used djrill.mail.backends.djrill.DjrillBackendHTTPError -- retained as equivalent for backwards compatibility).
2013-01-11 16:59:42 -08:00
medmunds
4be12952a3 Add send-template tests (and fixes).
Add test cases for send-template.
Expand template_content dict into Mandrill's name/value array.
Don't send template_content as "None" if missing.

Clean up some variable names in the backend.
2013-01-11 13:28:49 -08:00
medmunds
3b237a59db Merge branch 'send-template' of git://github.com/peillis/Djrill into send_template 2013-01-09 12:39:18 -08:00
medmunds
5b4f4c12cb Support sending attachments 2013-01-03 13:52:41 -08:00
peillis
046987a934 adding the send-template call 2012-12-24 13:36:37 +01:00
medmunds
8aab5e31b7 Expose most Mandrill send features on EmailMessage objects.
* Supports additional Mandrill send-API attributes on any ``EmailMessage``-derived object -- see details in readme
* Removes need for MANDRILL_API_URL in settings (since this is tightly tied to the code)
* Removes ``DjrillMessage`` from the readme (but not the code or tests) -- its functionality is now duplicated or exceeded by standard EmailMessage with additional attributes
* Ensures send(fail_silently=True) works as expected
2012-12-10 11:36:18 -08:00
Jared Morse
2eba028a1a DjrillBackend preserve_recipients 2012-12-03 18:55:05 -08:00
medmunds
d9cb23b003 Support from_name in "from_name <email>" sender address.
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
2012-11-23 10:47:20 -08:00
medmunds
c78bbc6ced [minor cleanup] Allow html from any EmailMultiAlternatives (not just DjrillMessage) 2012-11-16 11:07:15 -08:00
medmunds
c23696a590 Allow html from any EmailMultiAlternatives (not just DjrillMessage)
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)
2012-11-15 16:17:16 -08:00
medmunds
1901fd444e Allow extra headers from any EmailMessage (not just DjrillMessage)
Also adds test case for basic functionality on django.core.mail.EmailMessage.

Cherry-picked from: medmunds/Djrill@f0503783f
2012-11-15 15:49:08 -08:00
medmunds
5602fc5314 Backend: Remove obsolete api_verify altogether.
Remove connection management (remnant of sender verification, and
didn't match Django email backend signatures).
Reformat inherited patch to 80-char line width.
Consistent int return type from send_messages.
2012-10-31 11:51:47 -07:00
medmunds
c1e577c6f5 Backend: fix exception messaging 2012-10-31 11:44:03 -07:00
Arnaud Fribault
96b5733e9d Fixes error message formatting 2012-10-31 11:44:03 -07:00
Arnaud Fribault
5b35988034 Raise a valid exception if failedSilently is false 2012-10-31 11:44:03 -07:00
Theo Crevon
71292aa223 Update : new sender validation endpoint and process 2012-10-30 17:21:46 +01:00
Chris Jones
e8834fe326 Handle extra headers accepted by Mandrill, also extra option of from_name. Tests to cover checking of extra headers and from_name. 2012-02-28 15:35:29 -08:00
Chris Jones
4db1b9d087 You didn't see that. 2012-02-28 15:08:28 -08:00
Chris Jones
cbd7f429d6 from_name, make it so. 2012-02-28 15:06:01 -08:00
Chris Jones
64bbd40884 No, really. Now it works with standard emails. 2012-02-28 13:08:06 -08:00
Chris Jones
91b846fea3 DjrillMessage which wraps Django's EmailMultiAlternatives. Mail backend now works with standard email and multipart through the DjrillMessage object. 2012-02-28 13:03:26 -08:00
Chris Jones
d6ff089060 Fix recipients list. 2012-02-28 11:34:48 -08:00
Chris Jones
e4362f8c34 Its broken. Parse recipients. 2012-01-20 18:24:13 -08:00
Chris Jones
3b227b2f70 Basic send_mail functioning. 2012-01-20 18:03:33 -08:00
Chris Jones
fd04e60171 Start of the mail backend for djrill. 2012-01-20 16:59:15 -08:00