Skip to content

SES

CloudMock emulates Amazon SES, supporting email sending (recorded but not delivered), identity verification, and identity management. Sent emails are stored in memory for test assertions.

OperationStatusNotes
SendEmailSupportedRecords a send operation; no email is delivered
SendRawEmailSupportedRecords a raw MIME send; no email is delivered
VerifyEmailIdentitySupportedMarks an email address as verified
ListIdentitiesSupportedReturns all verified identities
DeleteIdentitySupportedRemoves a verified identity
GetIdentityVerificationAttributesSupportedReturns verification status for identities
ListVerifiedEmailAddressesSupportedReturns all verified email addresses
Terminal window
# Verify a sender identity
curl -X POST "http://localhost:4566/?Action=VerifyEmailIdentity&EmailAddress=sender@example.com"
# Send an email
curl -X POST "http://localhost:4566/?Action=SendEmail&Source=sender@example.com&Destination.ToAddresses.member.1=recipient@example.com&Message.Subject.Data=Hello&Message.Body.Text.Data=Hello+from+CloudMock"
# List identities
curl -X POST "http://localhost:4566/?Action=ListIdentities"
import { SESClient, SendEmailCommand, VerifyEmailIdentityCommand } from '@aws-sdk/client-ses';
const ses = new SESClient({
endpoint: 'http://localhost:4566',
region: 'us-east-1',
credentials: { accessKeyId: 'test', secretAccessKey: 'test' },
});
await ses.send(new VerifyEmailIdentityCommand({ EmailAddress: 'noreply@myapp.com' }));
const result = await ses.send(new SendEmailCommand({
Source: 'noreply@myapp.com',
Destination: { ToAddresses: ['user@example.com'] },
Message: {
Subject: { Data: 'Welcome!' },
Body: { Html: { Data: '<h1>Welcome to our app</h1>' } },
},
}));
console.log(result.MessageId);
import boto3
ses = boto3.client('ses', endpoint_url='http://localhost:4566',
aws_access_key_id='test', aws_secret_access_key='test',
region_name='us-east-1')
ses.verify_email_identity(EmailAddress='noreply@myapp.com')
response = ses.send_email(
Source='noreply@myapp.com',
Destination={'ToAddresses': ['user@example.com']},
Message={
'Subject': {'Data': 'Welcome!'},
'Body': {'Html': {'Data': '<h1>Welcome to our app</h1>'}},
},
)
print(response['MessageId'])
cloudmock.yml
services:
ses:
enabled: true

No additional service-specific configuration is required.

  • No SMTP delivery occurs. Email messages are stored in memory and accessible for test assertions via the dashboard.
  • All identities are immediately reported as verified (Success status).
  • SES v2 API (sesv2 service name) is not implemented.
  • Configuration sets, suppression lists, and dedicated IPs are not implemented.
  • Sending quotas are not enforced.
  • Templates (SendTemplatedEmail) are not implemented.
CodeHTTP StatusDescription
MessageRejected400The message could not be sent
MailFromDomainNotVerifiedException400The sender’s domain is not verified
ConfigurationSetDoesNotExistException400The configuration set does not exist
AccountSendingPausedException400Email sending is paused for this account