Skip to main content

AWS SES

Amazon Simple Email Service (SES) is an email platform that provides an easy, cost-effective way to send and receive email using your own email addresses and domains.

Configuration

Database Setup

Create a new entry in the notify_providers table with the following settings:
FieldValue
channel_type11 (AWS SES)
is_enabled1

Configuration Fields

AWS_ACCESS_KEY_ID
string
required
Access key for AWS instance
AWS_SECRET_ACCESS_KEY
string
required
Secret access key for AWS
AWS_REGION
string
required
Region of the AWS instance
Example Configuration:
{
  "AWS_ACCESS_KEY_ID": "Aws-Access-key",
  "AWS_SECRET_ACCESS_KEY": "Aws-Secret-Key",
  "AWS_REGION": "us-east-1"
}

Request Format

Sample Request Body

{
  "providerId": 11,
  "data": {
    "from": "sender@example.com",
    "to": "recipient@example.com",
    "cc": "cc@example.com",
    "bcc": "bcc@example.com",
    "subject": "Test subject",
    "text": "This is a test notification",
    "html": "<b>This is a test notification</b>",
    "replyTo": "reply@example.com",
    "attachments": [
      {
        "filename": "names.txt",
        "content": "John Doe\nJane Doe"
      }
    ]
  }
}

Request Fields

from
string
required
Sender’s email address
to
string
required
Recipient’s email address
cc
string
CC email address
bcc
string
BCC email address
subject
string
required
Email subject
text
string
Plain text version of the email
html
string
HTML version of the email
replyTo
string
Reply-to email address
attachments
array
Array of attachment objects

File Content Encoding

Ensure the encoding matches the file type. Incorrect encoding may cause the file to be unreadable or rejected.

Text-Based Files

For files with extensions: txt, csv, html, json, or xml:
  • Encode the file content as a UTF-8 string
  • Pass this UTF-8 string to the content field

Other File Types

For PDFs, images, spreadsheets, etc.:
  • Encode the file content using Base64
  • Pass the Base64 encoded string to the content field

Dependencies

PackageVersionDescription
@aws-sdk/client-ses^3.855.0AWS SDK for JavaScript SES client

References