Commit Graph

411 Commits

Author SHA1 Message Date
medmunds
1372ef21eb SendGrid: merge 'filters' in esp_extra
Previously, setting esp_extra['x-smtpapi']['filters']
would override the entire filters setting, potentially
undoing other Anymail options that use SendGrid
filters (like track_opens).

Now, 'filters' is special-cased, and merged with
any other Anymail filter options.

(We don't do a fully deep merge, because otherwise
there would be no way to use esp_extra to *clear*
Anymail settings.)
2016-04-30 10:21:11 -07:00
medmunds
a26d284772 Update readme for 0.2 2016-04-29 18:16:02 -07:00
medmunds
d3f914be12 Event-tracking webhooks
Closes #3
2016-04-29 18:10:50 -07:00
medmunds
36461e57b9 Keep angle brackets on SendGrid smtp-id
SendGrid seems to consistently use <angle brackets>
on Message-ID and smtp-id.
2016-04-29 15:05:58 -07:00
medmunds
df881fdb75 Allow kwargs overrides for (nearly) all settings
* Update utils.get_anymail_setting to support
  kwargs override of django.conf.settings values
* Use the updated version everywhere
* Switch from ImproperlyConfigured to
  AnymailConfigurationError exception
  (anticipates feature_wehooks change)

Closes #12
2016-04-29 14:34:34 -07:00
medmunds
6b415eeaae Docs: note limited Mandrill support
Mandrill has disabled our test account and API key,
so future development will be purely against their docs.

[ci skip]
2016-04-29 11:21:11 -07:00
medmunds
ebe6710326 Get rid of magic JSON serialization for Mailgun metadata.
Treat Mailgun metadata like all other ESPs: simple
key-value dict, where values are strings. If you want
to store JSON in metadata, you should serialize and
deserialize it yourself.
2016-04-29 09:46:13 -07:00
medmunds
8e43f29944 Workaround missing smtp-id in SendGrid tracking.
* Add smtp-id in unique_args (metadata), to ensure
  it shows up in click and open events.
* Add SENDGRID_GENERATE_MESSAGE_ID setting,
  default True, to control auto-Message-ID behavior.
* Document it.
2016-04-29 09:44:31 -07:00
Mike Edmunds
ca7dbdcec6 Docs: clarify ESP templates not yet implemented 2016-04-26 09:39:41 -07:00
medmunds
1e4abada8c Update Postmark integration test
Error message changed for invalid API token
2016-04-20 17:21:03 -07:00
medmunds
f50908c975 Mailgun integration tests tolerate server errors
Make Mailgun integration tests resilient to 403
and 5xx errors from events API.
2016-03-22 11:17:02 -07:00
medmunds
385d76b53a Move tests out of app module
(Directory structure as suggested in
[Django testing docs][1].)

[1]: https://docs.djangoproject.com/en/1.9/topics/testing/advanced/#using-the-django-test-runner-to-test-reusable-applications
2016-03-21 11:38:58 -07:00
medmunds
bb8494263f Readme: add RTD badge
[ci skip]
2016-03-16 09:40:27 -07:00
medmunds
abca7d9538 Clean up old Djrill/Mandrill tests
* Match other ESP test strategies for
  test_mandrill_backend and
  test_mandrill_integration

* Extract test_mandrill_session_sharing into
  SessionSharingTestCasesMixin for all
  requests-based ESP backends

* Move leftover Djrill feature tests into
  test_mandrill_djrill features (until they are
  handled as part of esp_extra or in normalized
  ESP template/merge features)

Closes #7
2016-03-15 18:08:41 -07:00
medmunds
12229ab116 Docs: make ESP feature matrix maintainable
(reST substitutions bring the table width back within
a normal editor's width!)

[ci skip]
2016-03-14 19:48:47 -07:00
medmunds
2b1c7d0dce Open 0.2.dev0
[ci skip]
2016-03-14 19:47:04 -07:00
medmunds
1c474e5c40 release 0.1 2016-03-14 13:50:51 -07:00
medmunds
1a1e5ba1a8 docs: update tagline 2016-03-14 13:42:56 -07:00
medmunds
fed98b14a8 install: remove need to name [esp]
Simplify install to just `pip install django-anymail`.
(Rather than `... django-anymail[mailgun]`

All of the ESPs so far require requests, so just move
that into the base requirements. (Chances are your
Django app already needs requests for some other
reason, anyway.)

Truly unique ESP dependencies (e.g., boto for
AWS-SES) could still use the setup extra features
mechanism.
2016-03-14 13:26:06 -07:00
medmunds
f95bf1fbc4 Docs: typos, formatting
[ci skip]
2016-03-14 13:01:30 -07:00
medmunds
7bbd1c7e4e SendGrid: support username/password auth
Closes #9
2016-03-14 12:39:41 -07:00
medmunds
9462d03dc1 Docs: add ESP feature support matrix
[ci skip]
2016-03-14 11:34:33 -07:00
medmunds
34d6676afa Add Postmark support 2016-03-14 11:06:45 -07:00
medmunds
c6d6b5dc09 Readme: SendGrid is here now (not coming soon) 2016-03-11 19:33:10 -08:00
medmunds
db20d4ae0c Travis should install SendGrid deps
[ci skip]  - they're the same as Mailgun deps
2016-03-11 19:22:54 -08:00
medmunds
a8d4ca7c28 Bump version to 0.1.dev2 2016-03-11 19:15:17 -08:00
medmunds
54827579d3 Improve inline-image handling
* Add filename param to attach_inline_image

* Add attach_inline_image_file function
  (parallels EmailMessage.attach and attach_file)

* Use `Content-Disposition: inline` to decide
  whether an attachment should be handled inline
  (whether or not it's an image, and whether or not
  it has a Content-ID)

* Stop conflating filename and Content-ID, for
  ESPs that allow both. (Solves problem where
  Google Inbox was displaying inline images
  as attachments when sent through SendGrid.)
2016-03-11 19:14:11 -08:00
medmunds
701726c59d Fix SG integration tests 2016-03-11 16:28:46 -08:00
medmunds
e15cb46daf Implement SendGridBackend
Covers most of #1
2016-03-11 16:17:02 -08:00
medmunds
b407e9f452 Preserve filename of inline attachments
For ESPs that support both content-id and filename,
don't drop the filename.
2016-03-11 10:07:13 -08:00
medmunds
6214fbbdcd utils: add datetime-->timestamp conversion 2016-03-11 10:04:43 -08:00
medmunds
7a528af438 Include backend name in requests user-agent string 2016-03-11 10:01:29 -08:00
medmunds
3e3c97d6d3 Readme: missed a Djrill --> Anymail 2016-03-10 18:05:49 -08:00
medmunds
7920a4537c Docs: Clarify AnymailMessage not required 2016-03-10 16:57:26 -08:00
medmunds
1e1a66ae44 Bump to 0.1.dev1 2016-03-09 20:33:01 -08:00
medmunds
b6bbdf4791 The *package* name is "django-anymail"
(not just "anymail")
2016-03-09 20:27:44 -08:00
medmunds
c13ef4d5fa Travis does svg badges now
[ci skip]
2016-03-09 20:12:42 -08:00
medmunds
b4c60d55bd Travis: needs to install all the ESP extras 2016-03-09 19:37:18 -08:00
medmunds
6ef1349b65 GitHub doesn't like Sphinx directives in rst 2016-03-09 19:30:34 -08:00
medmunds
37a54cde3f Travis: disable older Django versions 2016-03-09 18:51:57 -08:00
medmunds
1e80c3ec37 Invert unsupported-features setting
Change from UNSUPPORTED_FEATURE_ERRORS
(default True) to IGNORE_UNSUPPORTED_FEATURES
(default False). Parallels IGNORE_RECIPIENT_STATUS.
2016-03-09 18:47:42 -08:00
medmunds
20c6350140 Update (almost) all the docs 2016-03-09 18:37:11 -08:00
medmunds
8f0f2d3d83 Use RTD Sphinx theme for local doc builds 2016-03-07 19:21:28 -08:00
medmunds
d1d41badc8 Add Mailgun backend 2016-03-07 18:07:48 -08:00
medmunds
4ad2af2469 Allow running specific test cases in runtests 2016-03-06 10:34:23 -08:00
medmunds
3a93648481 Normalize ESP response and recipient status 2016-03-05 17:22:27 -08:00
medmunds
518e6e86f8 Normalize text/html alternative handling in BasePayload 2016-03-05 15:16:49 -08:00
medmunds
a6c0eb5974 Normalize send_at date/datetime/timestamp in BasePayload.
Interpret dates and naive datetimes as Django's
current_timezone (rather than UTC like Djrill did).
This should be more likely to behave as expected
when running with a non-UTC TIME_ZONE setting.
2016-03-05 11:23:18 -08:00
medmunds
0a5bca1426 Make requests optional for backends that don't need it
(Prep for installing backends as package extras)

* Extract AnymailRequestsBackend and RequestsPayload
  to base_requests.py
* Don't define/require requests exceptions when requests
  not available
2016-03-04 17:39:43 -08:00
medmunds
38729df93c Uniform settings handling
For MANDRILL_API_KEY (e.g.,), look for these settings:
* ANYMAIL = { 'MANDRILL_API_KEY': '...' }
* ANYMAIL_MANDRILL_API_KEY = "..."
* MANDRILL_API_KEY = "..."

(the "bare" third version is used only for settings that
might be reasonably shared with other apps, like api keys)
2016-03-04 17:02:43 -08:00