litestar-org / litestar

Production-ready, Light, Flexible and Extensible ASGI API framework | Effortlessly Build Performant APIs
https://litestar.dev/
MIT License
5.38k stars 364 forks source link

Enhancement: email service provider integration #3520

Closed fkromer closed 3 months ago

fkromer commented 3 months ago

Summary

In the Django world https://github.com/anymail/django-anymail is the kind of de-facto standard for integrating email service providers via a unified API. It would be nice to have an equivalent functionality in Litestar for the fullstack use case.

Basic Example

No response

Drawbacks and Impact

No response

Unresolved questions

No response


[!NOTE]
While we are open for sponsoring on GitHub Sponsors and OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.

Check out all issues funded or available for funding on our Polar.sh dashboard

  • If you would like to see an issue prioritized, make a pledge towards it!
  • We receive the pledge once the issue is completed & verified
  • This, along with engagement in the community, helps us know which features are a priority to our users.

Fund with Polar

provinzkraut commented 3 months ago

I don't think that this is something that makes sense to have, as there's virtually zero framework integration necessary. Could you elaborate what features that are specific to Litestar would be useful here? The way I see it, there's nothing from preventing a 3rd party ESP library to work inside a Litestar app just like it would anywhere else.

fkromer commented 3 months ago

The issue title is misleading I guess.

For Litestar Fullstack it would be pretty helpful to have some Litestar plugin which abstracts ESP specifics behind a unified API. This enables swapping out a console email backend used in development with a test server e.g. provided by mailtrap.io in staging and a email backend suitable for production like e.g. AWS SES in production. In Django swapping out the email implementation for development, staging and production is super easy using dedicated settings files + ENV vars (host, etc.).

provinzkraut commented 3 months ago

I agree that this would be useful, but I still don't see why this unified API has to be Litestar specific?