Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resend: new ESP #341

Merged
merged 11 commits into from
Oct 25, 2023
Merged

Resend: new ESP #341

merged 11 commits into from
Oct 25, 2023

Conversation

medmunds
Copy link
Contributor

@medmunds medmunds commented Sep 29, 2023

Add support for Resend.com - see #329

  • Backend
  • Custom headers for metadata and tags
  • Tracking webhook
  • Integration tests
  • Docs
  • Readme/project/tox/workflows

@medmunds medmunds force-pushed the feature/resend-esp branch 3 times, most recently from 462fbc6 to 60d4691 Compare October 5, 2023 17:28
@medmunds
Copy link
Contributor Author

medmunds commented Oct 5, 2023

Hoping to get some updates from Resend about issues with display-names before merging, but this is pretty much complete.

If anyone wants to test Resend now, you can install django-anymail directly from this PR branch:

python -m pip install \
  'git+https://github.com/anymail/django-anymail.git@feature/resend-esp'

Anymail Resend docs are in this PR, if you don't mind reading around the Sphinx markup that GitHub doesn't support. (Properly formatted docs will be on anymail.dev once merged.)

@medmunds medmunds marked this pull request as ready for review October 5, 2023 17:45
@medmunds medmunds changed the title Resend: new ESP [WIP] Resend: new ESP Oct 5, 2023
Add a workaround that allows non-ascii
characters in `from_email` by avoiding
standards complaint RFC 2047 encoding.

Also add undocumented setting to disable
workarounds if/when Resend's API accepts
standard address formats.
Resend pushed new API that allows
commas and parens in display names
(but still has trouble with " < etc.)
As of ~2023-10-20 API update, custom
header values must be strings. (Numbers
are not coerced to strings, and multivalue
headers via arrays are no longer
allowed.)
For from display-names, use correct
RFC 5322 quoting and escaping, but
with raw Unicode text (skip RFC 2047
encoding for non-ASCII chars).

As of the latest API updates, Resend
correctly handles some quoting, but
rejects or randomly rewrites the
display name in other cases. (But
there's nothing we can do about those
cases; hopefully the API continues
to improve.)
@medmunds medmunds merged commit b5ef492 into main Oct 25, 2023
58 checks passed
@medmunds medmunds deleted the feature/resend-esp branch March 12, 2024 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant