Image 1 of 1

AWS SES

Product information

By Vendure Open Source

Send transactional emails using Amazon’s Simple Email Service (SES)

npm install @vendure/email-plugin
Support languages
en
Integration type
Core
Category
Email
Compatible with
^3.0.0
Latest version
3.0.6
Last published
Nov 15, 2024
Downloads in past month
14,974

Installation

The Vendure EmailPlugin is usually installed by default, but if you don’t have it in your project follow the installation instructions to install and configure the plugin in your project.

Next, install the @aws-sdk/client-ses package:

npm install @aws-sdk/client-ses

Configuration

Now you are ready to configure the EmailPlugin to use the SES transport method:

// src/vendure-config.ts
import { VendureConfig } from '@vendure/core';
import { defaultEmailHandlers, EmailPlugin, FileBasedTemplateLoader } from '@vendure/email-plugin';
import { SES, SendRawEmailCommand } from '@aws-sdk/client-ses'

const ses = new SES({
  apiVersion: '2010-12-01',
  region: 'eu-central-1',
  credentials: {
    accessKeyId: process.env.SES_ACCESS_KEY || '',
    secretAccessKey: process.env.SES_SECRET_KEY || '',
  },
});

const config: VendureConfig = {
  // Add an instance of the plugin to the plugins array
  plugins: [
    EmailPlugin.init({
      handlers: defaultEmailHandlers,
      templateLoader: new FileBasedTemplateLoader(path.join(__dirname, '../static/email/templates')),
      transport: {
        type: 'ses',
        SES: { ses, aws: { SendRawEmailCommand } },
        sendingRate: 10, // optional messages per second sending rate
      },
    }),
  ],
};

For more details on configuration, see the Nodemailer SES docs.

Vendure
Get started

Create your first commerce experience with Vendure in less than 2 minutes

Vendure is a registered trademark. Our trademark policy ensures that our brand and products are protected. Feel free to reach out if you have any questions about our trademarks.

Newsletter

Get the latest product news and announcements delivered directly to your inbox.

© Copyright 2022 - 2024, Vendure GmbH. All rights reserved.