Compatible API · Amazon SES

Amazon SES API compatible: change the URL and the key

SMTP Senpai accepts send requests in the same format as the Amazon SES API (v2 SendEmail, v1 SendEmail and SendRawEmail). Point your code to SMTP Senpai, use your msp_ key and keep your SDK, your fields and your error handling.

14 days free · up to 100 emails a day · card required · if you don’t cancel within 14 days, the plan you chose starts

  • Same paths, fields and errors
  • Sending servers and log in the EU
  • 14-day free trial
Node.js · @aws-sdk/client-sesv2 3.1148.0 · what changes
  import { SESv2Client } from '@aws-sdk/client-sesv2';
- const ses = new SESv2Client({ region: 'eu-west-1' });
+ const key = process.env.SMTP_SENPAI_KEY; // msp_…
+ const ses = new SESv2Client({
+   region: 'eu-west-1', // any region
+   endpoint: 'https://app.mailsenpai.com/relay/compat/ses',
+   credentials: { accessKeyId: key, secretAccessKey: key },
+ });
what changes

Two things change, the rest stays

Same paths, same fields, same responses and error shapes as the Amazon SES API (v2 SendEmail, v1 SendEmail and SendRawEmail).

Base URLhttps://app.mailsenpai.com/relay/compat/ses
Or the dedicated hosthttps://ses-api.mailsenpai.com
Where the key goesAccess Key ID and Secret Access Key = msp_… (any region)
Paths (unchanged)POST /v2/email/outbound-emails; POST / (Action=SendEmail, SendRawEmail)

The sender must be on a domain verified in your SMTP Senpai area and signed with DKIM: otherwise the request is refused with an error in the Amazon SES format.

the code

Your code, pointed to SMTP Senpai

Node.js · @aws-sdk/client-sesv2 3.1148.0 · after
import { SESv2Client } from '@aws-sdk/client-sesv2';
const key = process.env.SMTP_SENPAI_KEY; // msp_…
const ses = new SESv2Client({
  region: 'eu-west-1', // any region
  endpoint: 'https://app.mailsenpai.com/relay/compat/ses',
  credentials: { accessKeyId: key, secretAccessKey: key },
});

Tested with @aws-sdk/client-sesv2 3.1148.0: run with the official SDK against the SMTP Senpai endpoints.

Python · boto3 1.43 · after
import os
import boto3
key = os.environ['SMTP_SENPAI_KEY']  # msp_…
ses = boto3.client('sesv2', region_name='eu-west-1',
                   endpoint_url='https://app.mailsenpai.com/relay/compat/ses',
                   aws_access_key_id=key, aws_secret_access_key=key)

Tested with boto3 1.43 against SMTP Senpai: connection, authentication and error handling.

Other languages and frameworks

Settings read in the source code of each SDK: they follow the same rule (base URL or host, plus your key). Try them with a test send before going live.

SDKSettingStatus
JS @aws-sdk/client-ses (v1 API)same endpoint and credentials, SendEmailCommand / SendRawEmailCommandTested
PHP aws/aws-sdk-phpnew Aws\SesV2\SesV2Client(['region' => 'eu-west-1', 'version' => 'latest', 'endpoint' => 'https://app.mailsenpai.com/relay/compat/ses', 'credentials' => ['key' => $key, 'secret' => $key]])Read in the SDK source code, not yet tested
Laravel ses / ses-v2'ses' => ['key' => KEY, 'secret' => KEY, 'region' => 'eu-west-1', 'endpoint' => 'https://ses-api.mailsenpai.com']Read in the SDK source code, not yet tested
Symfony MailerMAILER_DSN=ses+https://KEY:[email protected]?region=eu-west-1Read in the SDK source code, not yet tested
fields

What works, what is ignored, what is refused

Works

Content.Simple (Subject, Text, Html, Headers, Attachments), Content.Raw (full MIME, as sent by Laravel ses-v2, Symfony ses+https and Nodemailer), Destination, ReplyToAddresses; v1 SendEmail and SendRawEmail with XML responses

Accepted without effect

ConfigurationSetName, EmailTags, ListManagementOptions, feedback forwarding settings

Named in the X-MailSenpai-Ignored response header.

Refused with the Amazon SES error

Content.Template, EndpointId (multi-region endpoints)

Every request is checked with AWS Signature Version 4, as the AWS SDKs sign it: use your msp_ key as both Access Key ID and Secret Access Key. Nodemailer’s SES transport works too, including verify().

events and webhooks

Delivery results from the SMTP Senpai API

The Amazon SES endpoints for logs, events, statistics and webhooks are not reproduced. Results (sent, delivered, bounce, defer, complaint, dropped, open, click) come from the SMTP Senpai API with the same key: GET /relay/v1/eventi, or a signed webhook set in your SMTP Senpai area.

The id in the send response is the message_id of those events. Each response also carries X-MailSenpai-Result (sent, queued, suppressed, failed).

Read the events and webhook reference

Limits. Up to 50 recipients per message and 500 copies per request (over 50 they are queued and leave within about a minute), 10 attachments and 10 MB per message. Templates and scheduled sending are not supported: send the final content when you want it to leave.
Terminal · SMTP Senpai events
curl "https://app.mailsenpai.com/relay/v1/eventi?quanti=50" \
  -H "Authorization: Bearer $SMTP_SENPAI_KEY"

# {"ok": true, "eventi": [{"type": "delivered",
#   "email": "…", "message_id": "…", …}], "prossimo": …}

Frequently asked questions

Do I have to rewrite my Amazon SES code?

No. You change the base URL (or the host) and the key. Paths, fields, responses and the error format stay those of the Amazon SES API (v2 SendEmail, v1 SendEmail and SendRawEmail), so your SDK and your error handling keep working.

What about templates and scheduled sending?

They are not supported: requests that use them are refused with the native error, so nothing leaves by mistake. Build the final content in your code and send it when you want it to leave.

How do I get bounces, opens and webhooks?

From the SMTP Senpai API, with the same key: GET /relay/v1/eventi or a signed webhook set in your SMTP Senpai area. The Amazon SES event and webhook endpoints are not reproduced.

Which region and credentials do I use?

Any region. Use your msp_ key as both Access Key ID and Secret Access Key: every request is checked with AWS Signature Version 4.

Can I keep sending through SMTP?

Yes. The same account also works over SMTP (relay.mailsenpai.com, port 2525, STARTTLS) and with the SMTP Senpai REST API.

Try SMTP Senpai with your current code

14 days to change the base URL and the key, send your real emails and check every result in the log. Then decide.

Amazon SES, Amazon Web Services and AWS are trademarks of Amazon.com, Inc. or its affiliates. It is named only to describe the request format SMTP Senpai accepts. MailSenpai is not affiliated with Amazon Web Services and this page is not approved by them. Information checked on 9 October 2026.

14 days freeFree trial