The purpouse of this AWS Lambda function is to quickly add email sending capapbilities in to your project. Once deployed you have to just invoce this function with the following payload:
{
from : '"First Last" <[email protected]>',
to : '[email protected]',
subject : 'Nice subject',
reply_to : '[email protected]' || '',
html : '<p>HTML version of the message</p>' || '',
text : 'Plaintext version of the messag' || ''
}
The function will return the messageId
and response
so you can log the ID of the sent email
{
messageId: '<[email protected]>',
response: '0000000000000-0000-000-000-000-000-000000'
}
For the function to wokr you'll need to create a Role with the following policies:
- AWSLambdaBasicExecutionRole
- AmazonSESFullAccess
If you enjoyed this project, please consider giving it a ๐. And check out our 0x4447 GitHub account, where we have additional articles and tools that you might find interesting.
If you'd like us to help you with something, please feel free to say [email protected], and share what's on your mind. We'll take a look, and try our best to help you. Or visit our website at: 0x4447.com.