Skip to content

Request paths

A send, a bounce and an inbound message, step by step.

Applies to EngineCloud
View as Markdown
On this page
  1. A send
  2. A bounce
  3. An inbound message

A send

  1. POST /v1/emails reaches the engine; it checks the key and its scope, the from domain, the suppression list, the size, and the project’s rate and daily limits in one transaction.
  2. It stores the e-mail with status queued and its rendered body (or renders it now if the template’s data is given), and answers 202.
  3. The sender takes e-mails from the queue with FOR UPDATE SKIP LOCKED, per project and at the pace the project’s token bucket allows.
  4. It builds the MIME message, adds tracking if on, and calls SendRawEmail with the domain’s configuration set. The SES message id is stored; status sent.
  5. If SES answers with a throttle or a temporary error, the e-mail goes back to the queue with backoff; after 24 hours it becomes rejected.

A bounce

  1. The recipient’s server refuses the message; SES publishes a bounce to an SNS topic, which writes it to an SQS queue.
  2. The event receiver reads the queue, finds the e-mail by the SES message id, records bounced with the reason, and for a hard bounce adds the address to the project’s suppression list.
  3. The webhook dispatcher sends the event to every webhook subscribed to bounced.

An inbound message

  1. SES receives the message for an address whose MX points to it, stores the raw message in S3 and notifies the engine.
  2. The inbound parser reads it, checks spam and virus verdicts, finds the matching rule, stores attachments and calls the webhook or Run function, or forwards it.
  1. A send
  2. A bounce
  3. An inbound message

    Search pages, sections and terms