ENH: Add support for relaying emails via boto3
for use cases where apps running in AWS use IAM policies to authenticate against SES
#86
Labels
enhancement
New feature or request
Is your feature request related to a problem? Please describe.
Whilst Amazon SES offers relaying emails via SMTP there are cases where the environment is configured to use IAM policies for authentication. This applies to services like S3 for file storage or SES for email relay.
In these use cases the application would simply instantiate the
boto3
client as:and use their
send_email
function to send the message without the need of authenticating.Describe the solution you'd like
If it's amicable with the design of this project then I would like to be able to initialise
EmailSender
with preconfigureboto3
client no different to how we can pass a customSMTP
instance.the
send
function would then use theboto3
client instead of an SMTP server to relay the emails.This way we get the array of functionality (namely templating) that this library offers and integrate into a platform like AWS.Describe alternatives you've considered
At the moment our only alternative is to render Jinja templates on our own and then relay messages via
boto3
.Additional context
This may be relevant to other cloud services like GCP or Azure. We've been working with the lovely folk @resendlabs who maintain a Python idiomatic SDK and could see this as an enhancement.
I would personally be willing to work on the
boto3
andresend
integration and provide a pull request :)The text was updated successfully, but these errors were encountered: