Connect by JBRH Open Connect

Amazon SES

Amazon Simple Email Service (SES) is one of the routes by which Connect sends email. Connect calls the SES v2 API through boto3, by default in the Mumbai region, and records SES's message ID as evidence that the message was accepted. JBRH Mail's sending identities and its event notifications also live in SES. Delivery, bounces and complaints come back as events. On the production host, JBRH Mail's Stalwart relays outbound mail through SMTP2GO, not SES: SES carries a message only for an identity configured to use it.

Status
Reference What this means
Audience
both, developer
Last verified
Product version
6.3.2

What it is#

Amazon SES is AWS's email-sending service, launched in 2011. A sender verifies a domain or address as an identity, publishes DKIM records, and sends through an API or SMTP. Configuration sets route events such as deliveries, bounces and complaints to notification targets.

boto3 is the AWS SDK for Python. Connect uses its sesv2 client for sending, s3 for media and files, and secretsmanager where a credential is read from a secret store.

Category
Email sending service
Client
boto3>=1.35, sesv2 client
Default region
ap-south-1 (the provider setting can change it)
Official site
aws.amazon.com/ses

Where Connect uses it#

Place in ConnectWhat it does there
backend/app/providers.pyThe SES send path: build the MIME message, call SES, keep the message ID
backend/app/safe_sales.pySales sends that go through SES
JBRH MailSending identities, the configuration set and its notification topic
email_delivery_webhooks.pyDelivery, bounce and complaint events, verified before use

How it connects#

  1. A message passes Connect's send boundary (autonomy, allowance, suppression)
  2. The MIME message is built with the business's From and DKIM-aligned domain
  3. sesv2.send_email returns a message ID: accepted, not yet delivered
  4. Delivery, bounce or complaint events arrive later
  5. Bounces and complaints feed the suppression list

Benefits and limits#

What it gives Connect:

  • High deliverability infrastructure at a low per-message price.
  • Events give the evidence a business needs: accepted, delivered, bounced, complained.
  • Region choice keeps sending in India alongside the rest of the stack.

Where it stops, and what Connect does about it:

  • New accounts start in the SES sandbox with sending limits until AWS approves production access.
  • Accepted is not delivered. Connect never reports a send as delivered on SES's acceptance alone.
  • Reputation is per account and domain. Sustained bounces or complaints can pause sending.

Security and privacy#

  • Domains are authenticated with SPF, DKIM and DMARC (DMARC).
  • On the host, AWS access comes from the instance role, not stored keys.
  • Suppression and one-click unsubscribe are honoured before SES is ever called.

Licence, cost and versions#

QuestionAnswer
LicenceSES: commercial service. boto3: Apache-2.0
CostPer message and data, per the SES pricing page
VersionSES API v2; boto3>=1.35
CompatibilityAny region where SES is offered; identities are per region

Troubleshooting#

MessageRejected: Email address is not verified
The account or region is still in the SES sandbox, or the From identity is not verified in that region.
Mail sent but not received
Check the event stream for a bounce or complaint, and the recipient's spam folder. See deliverability.
Throttling errors
The account's send rate was exceeded. The queue paces and retries.

Official references#

Questions#

Does every Connect email go through SES?

No. A connected Gmail or Microsoft mailbox sends through its own provider, and JBRH Mail mailboxes through Stalwart. SES is the route for the identities configured to use it.

Why does Connect say 'accepted' rather than 'delivered'?

Because SES returning a message ID means it took the message. Delivery is a later event, and Connect records it only when the event arrives.