Commit Graph

400 Commits

Author SHA1 Message Date
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
medmunds
3b414a9619 Move all the payload construction into Payload classes 2016-03-04 15:55:19 -08:00
medmunds
dbf57d8a33 Move common message attrs into base backend 2016-03-03 16:52:10 -08:00
medmunds
ef971489cd Start factoring out common backend functionality 2016-02-29 11:52:35 -08:00
medmunds
1c7fe8a759 Rename exceptions
* Change Djrill -> Mandrill in exception names
* Don't re-export at package level
  (import from anymail.exceptions, not from anymail)
2016-02-27 12:03:45 -08:00
medmunds
921dd5d0d6 Fork from Djrill and rename to "anymail" 2016-02-27 11:16:04 -08:00
medmunds
f95d5d66dc Avoid weak ref to local signal receiver in webhook tests.
Webhook tests define a local signal receiver function,
so connect it using the `weak=False` option to set
a good example.

(This isn't technically needed in the tests: the test receivers
are only connected while their definitions are still in scope,
so they couldn't possibly be garbage collected. But it doesn't
hurt, and it's good practice in case the test code gets copied.)

Also update the webhook docs to have a direct link to
Django's "listening to signals" info.
2016-02-04 12:14:01 -08:00
medmunds
9c938c8e85 Fix webhook tests for pypy
(Disconnect signal receivers after
we're done with them, to avoid
confusion between test cases.)
2016-02-03 19:42:01 -08:00
medmunds
79eaac42c4 Handle Mandrill sync event webhooks
Fixes #108
2016-02-03 19:29:26 -08:00
medmunds
5d4440ef5d Open v2.1 development
[ci skip]
2015-12-02 20:06:32 -08:00
medmunds
48028ecf64 Switch back to python-approved versioning
2.0.0-dev0 --> 2.0.0.dev0 (or just 2.0.dev0)

We still practice semver in the major.minor.patch
versions; we just don't use semver's "-" for
pre-release versions. (Because, PEP 0440.)

https://www.python.org/dev/peps/pep-0440/
2015-12-02 19:50:28 -08:00
Mike Edmunds
68929e015e Merge pull request #105 from brack3t/v2.0-dev
Move master to v2.0
2015-12-02 18:51:01 -08:00