Commit Graph

135 Commits

Author SHA1 Message Date
medmunds
09de5faebe Support embedded images.
Treat image attachments with a Content-ID header as embedded, rather than ordinary attachments. (Rationale is that you must set the content-id to be able to refer to the image within your html, so that's a reasonable indicator to handle it as embedded.)
2013-03-01 13:58:07 -08:00
medmunds
92d413f5ae Don't filter attachment types
Mandrill dropped filtering on attachment mimetypes, so stop enforcing this in Djrill.
Fixes #26
2013-02-28 17:47:47 -08:00
medmunds
921baab602 Version 0.3.1 2013-01-13 08:17:41 -08:00
medmunds
ed3249cede Correct name/content lists for template_content, merge_vars, global_merge_vars.
Fixes #24.
2013-01-13 08:16:40 -08:00
medmunds
9380b1d8c9 Prep for 0.3.0 release
- Update version numbers
- Release notes
- Update authors
2013-01-12 14:20:40 -08:00
medmunds
860ebcdc44 Python 3.2 (but not 3.3) b64decode requires bytes not str 2013-01-12 14:00:34 -08:00
medmunds
ac0614a633 More Python 3.2 fixes - attachment encoding 2013-01-12 13:32:57 -08:00
medmunds
b4f2866f0f Python 3.2 fixes
- Absolute imports
- Unicode strings
2013-01-12 11:45:44 -08:00
medmunds
8de6b218b9 Handle bcc as Mandrill bcc_address, rather than additional to address 2013-01-12 10:26:42 -08:00
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
207e94e6d0 Tests: add ability to check which Mandrill API endpoint was used.
Add DjrillBackendMockAPITestCase.assert_mandrill_called; use it in representative backend test cases.

(Also make get_api_call_data work with various ways of calling requests.post.)
2013-01-11 12:44:06 -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
medmunds
d1b0e0a574 Tests: break apart tests.py into tests directory 2013-01-03 10:51:07 -08:00
peillis
046987a934 adding the send-template call 2012-12-24 13:36:37 +01:00
medmunds
bc9e6212a6 Version 0.2.0
* Release notes in readme
* Update example in readme
* Note deprecation of DjrillMessage class
* Longer long_description for PyPI
* Update authors
* Bump version number (setup.py and __init__.py)
2012-12-11 13:19:21 -08:00
medmunds
2a2ca6c137 Unclosed <dl> in admin status.html 2012-12-11 10:55:01 -08:00
medmunds
b0da1cf953 DjrillMessage class fixes
* Don't crash if no tags
* Allow `None` to omit options entirely from Mandrill send call
* Default `preserve_recipients` to None (= use setting from Mandrill account)
* ImproperlyConfigured --> ValueError for bad tags
2012-12-11 10:50:08 -08:00
medmunds
0a2595d731 Add test to ensure Mandrill account settings not overridden by default.
Default behavior should be to not pass any options to the Mandrill send API that haven't been specifically requested by the caller.
2012-12-10 11:36:19 -08: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
medmunds
49238b28ae Fix django.conf.urls.defaults deprecation warning in admin
(Test on Django 1.3, 1.4, 1.5b)
2012-12-05 16:06:12 -08:00
medmunds
5f0ff0cba2 Remove unused adminmedia template tag
Fixes brack3t/Djrill#14
2012-12-05 16:04:55 -08:00
medmunds
2c539141f6 Merge commit '008b6cf' into test_admin_views
Conflicts:
	djrill/admin.py
2012-12-05 16:01:17 -08:00
medmunds
1b47ee93e4 Add simple tests for admin views.
Make sure the admin views load without error. (Not really trying to test content right now.)

This includes failing test cases for:
* brack3t/Djrill#8: admin.autodiscover() fails without django-adminplus or DjrillAdminSite
* brack3t/Djrill#14: Django 1.5 doesn't support adminmedia template tag
2012-12-05 15:52:02 -08:00
Kenneth Love
da37c4c750 Update djrill/mail/__init__.py
Defaulting `preserve_recipents` to False.
2012-12-04 17:29:20 -08:00
Jared Morse
2eba028a1a DjrillBackend preserve_recipients 2012-12-03 18:55:05 -08:00
Jared Morse
7827352da1 preserve_recipients parameter in DjrillMessage 2012-12-03 18:52:58 -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
Kenneth Love
5a986fe5b5 removed other mention of ADMIN_MEDIA_PREFIX 2012-11-23 10:00:13 -08:00
Kenneth Love
2aaa72edaf Merge pull request #9 from medmunds/admin_remove_verify_sender
Remove obsolete admin related to sender verification
2012-11-23 09:53:07 -08:00
medmunds
052f54113e Remove obsolete admin related to sender verification
(Also match admin view method signatures to base classes and remove
unused imports while we're in there.)

Cherry-picked from medmunds/Djrill@ce69fd78
2012-11-21 14:46:32 -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
Rafael E. Belliard
008b6cfa36 Provide a way to block admin.py when django-adminplus isn't loaded. 2012-11-13 17:05:50 -04:00
medmunds
1bec172611 Testing on backend API calls, using mock; add runtests.py.
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
2012-10-31 18:15:54 -07:00
Kenneth Love
442229d08d added AUTHORS.txt. bumped version to 0.1.2 2012-10-31 14:17:37 -07: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
Kenneth Love
7c0dc87d2d {% admin_media_prefix %} is now {{ STATIC_URL }}admin/. Fixes issue #2 2012-10-24 16:58:34 -07: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
47860493af Better API error handling. 2012-02-28 14:54:40 -08:00