Nefarious Planetary Meddling
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

strapi-provider-email-aws-sdk-ses

1.0.0 • Public • Published

strapi-provider-email-aws-sdk-ses

Amazon Simple Email Service provider based on AWS SDK for Strapi Email Plugin.

Benefits

Installation

npm install strapi-provider-email-aws-sdk-ses

Programmatic usage

'use strict';
 
/**
 * `Emails` service.
 */
 
 
module.exports = {
  send: async () => {
 
    const options = {
      to: 'somebody@example.com',
      from: 'sender@example.com',
      replyTo: 'no-reply@example.com',
      subject: 'Use strapi email provider successfully',
      text: 'Hello world!',
      html: 'Hello world!',
    };
 
    // Retrieve provider configuration.
    const config = await strapi.store({
      environment: strapi.config.environment,
      type: 'plugin',
      name: 'email'
    }).get({ key: 'provider' });
 
    // Verify if the file email is enable.
    if (config.enabled === false) {
      strapi.log.error('Email is disabled');
      return false;
    }
 
    return await strapi.plugins.email.services.email.send(options, config);
  }
 
};

Configure the plugin

Resources

Links

Install

npm i strapi-provider-email-aws-sdk-ses

DownloadsWeekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

7.17 kB

Total Files

5

Last publish

Collaborators

  • avatar