Receiving

Get email content

Fetch the HTML body, plain text, and headers of a received email with the Receiving API.

A received email holds the HTML body, the plain-text body, and the message headers. Because the webhook carries only metadata, you fetch this content from the Receiving API using the email_id from the event.

Webhooks do not include the body, headers, or attachment content — only metadata. Call Retrieve received email for the body and headers, or the Attachments API for attachment content. This keeps payloads small for serverless platforms with limited request-body sizes.

Fetch the content

After the email.received webhook arrives, issue a GET /emails/receiving/:id with the email_id to read html, text, and headers:

import { MailBlastr } from 'mailblastr';

const mb = new MailBlastr('mb_xxxxxxxxx');

const { data, error } = await mb.emails.receiving.get('56761188-7520-42d8-8898-ff6fc54ce618');
console.log({ data, error });

Response

The response is the received-email object, including the parsed html, text, and headers. See Retrieve received email for the full field reference.

{
  "object": "received_email",
  "id": "56761188-7520-42d8-8898-ff6fc54ce618",
  "from": "onboarding@mailblastr.dev",
  "to": ["delivered@mailblastr.dev"],
  "subject": "Sending this example",
  "message_id": "<111-222-333@email.example.com>",
  "html": "<p>Hello there!</p>",
  "text": "Hello there!",
  "headers": {
    "From": "onboarding@mailblastr.dev",
    "To": "delivered@mailblastr.dev",
    "Subject": "Sending this example",
    "Message-ID": "<111-222-333@email.example.com>"
  },
  "created_at": "2026-02-22T23:41:11.894Z"
}
Need the exact bytes that arrived — for example to re-parse MIME or extract inline images? Use the raw download URL exposed on the received email (see Forward emails) rather than the parsed html/text.