mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Add inbound mail handling
Add normalized event, signal, and webhooks for inbound mail. Closes #43 Closes #86
This commit is contained in:
@@ -302,6 +302,37 @@ for each event in the batch.)
|
||||
.. _Sendgrid event: https://sendgrid.com/docs/API_Reference/Webhooks/event.html
|
||||
|
||||
|
||||
.. _sendgrid-inbound:
|
||||
|
||||
Inbound webhook
|
||||
---------------
|
||||
|
||||
If you want to receive email from SendGrid through Anymail's normalized :ref:`inbound <inbound>`
|
||||
handling, follow SendGrid's `Inbound Parse Webhook`_ guide to set up
|
||||
Anymail's inbound webhook.
|
||||
|
||||
The Destination URL setting will be:
|
||||
|
||||
:samp:`https://{random}:{random}@{yoursite.example.com}/anymail/sendgrid/inbound/`
|
||||
|
||||
* *random:random* is an :setting:`ANYMAIL_WEBHOOK_AUTHORIZATION` shared secret
|
||||
* *yoursite.example.com* is your Django site
|
||||
|
||||
Be sure the URL has a trailing slash. (SendGrid's inbound processing won't follow Django's
|
||||
:setting:`APPEND_SLASH` redirect.)
|
||||
|
||||
If you want to use Anymail's normalized :attr:`~anymail.inbound.AnymailInboundMessage.spam_detected` and
|
||||
:attr:`~anymail.inbound.AnymailInboundMessage.spam_score` attributes, be sure to enable the "Check
|
||||
incoming emails for spam" checkbox.
|
||||
|
||||
You have a choice for SendGrid's "POST the raw, full MIME message" checkbox. Anymail will handle
|
||||
either option (and you can change it at any time). Enabling raw MIME will give the most accurate
|
||||
representation of *any* received email (including complex forms like multi-message mailing list
|
||||
digests). But disabling it *may* use less memory while processing messages with many large attachments.
|
||||
|
||||
.. _Inbound Parse Webhook:
|
||||
https://sendgrid.com/docs/Classroom/Basics/Inbound_Parse_Webhook/setting_up_the_inbound_parse_webhook.html
|
||||
|
||||
|
||||
.. _sendgrid-v3-upgrade:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user