strapi-email-aws-ses-v3
v1.1.0
Published
Simple implementation of Amazon SES for sending emails using SDK v3
Downloads
24
Readme
AWS SES Email Service Module
This module provides a simple interface for sending emails using Amazon Simple Email Service (SES) via the AWS SDK.
Table of Contents
Resources
This module uses the AWS SDK to interact with the SES service to send emails.
Links
Installation
Using npm
npm install strapi-email-aws-ses-v3
Using yarn
yarn add strapi-email-aws-ses-v3
Configuration
| Variable | Type | Description | Required | Default |
|---------------------|-------------------|----------------------------------------------------------------------------|----------|-----------------------|
| providerOptions
| object | Configuration options for the SES client. See AWS SDK documentation. | yes | N/A |
| settings
| object | General email settings, such as default sender and reply-to addresses. | yes | N/A |
| settings.defaultFrom
| string | The default sender email address. | yes | undefined |
| settings.defaultReplyTo
| string | The default reply-to email address or array of addresses. | yes | undefined |
Example
Path - config/plugins.js
module.exports = ({ env }) => ({
// ...
email: {
config: {
provider: 'strapi-email-aws-ses-v3',
providerOptions: {
credentials: AwsCredentialsObject,
region: env("AWS_REGION"),
},
settings: {
defaultFrom: env("DEFAULT_FROM"),
defaultReplyTo: env("DEFAULT_REPLY_TO"),
},
},
},
// ...
});
Error Handling
- Initialization errors: If
defaultFrom
ordefaultReplyTo
are not provided in the settings, an error will be thrown. - SES errors: The method will return an error if sending via AWS SES fails. Ensure proper AWS credentials and permissions are set up.