Emails

Create outbound SMTP email

Our API for creating an email is inspired by and leverages Nodemailer's message option configuration. Please defer to the Nodemailer message configuration for all body parameters below.

Note that with the exception of envelope and dkim (since we set those automatically for you), we support all Nodemailer options. We automatically set disableFileAccess and disableUrlAccess options to true for security purposes.

You should either pass the single option of raw with your raw full email including headers or pass individual body parameter options below.

This API endpoint will automatically encode emojis for you if they are found in the headers (e.g. a subject line of Subject: 🤓 Hello gets converted to Subject: =?UTF-8?Q?=F0=9F=A4=93?= Hello automatically). Our goal was to make an extremely developer-friendly and dummy-proof email API.

Scheduled Sending: To schedule an email for future delivery, set the date field to a future timestamp (must be at least 1 minute ahead and no more than 30 days from now). The email will be held until the specified time. You can cancel it using the Delete email endpoint.

Authentication: This endpoint supports both API token authentication and alias credentials authentication. You can authenticate using either your API key (recommended) or your alias email address and generated password. See the Authentication section in the API documentation for details.

A domain's catch-all password also works here, with any address on the domain as the username. It can only send: the email is sent as the domain admin who generated the password, the From address can be any address on the domain, and the login cannot be used with any other endpoint.

post/v1/emails

Request

  • Base URL: https://api.forwardemail.net
  • URL: https://api.forwardemail.net/v1/emails
  • Auth: one of:
    • HTTP basic
    • HTTP basic

Request body

fromstring email

The email address of the sender (must exist as an alias of the domain).

subjectstring

The subject of the email.

textstring

The plaintext version of the message.

htmlstring

The HTML version of the message.

attachmentsobject[]

An array of attachment objects (see Nodemailer's common fields).

senderstring email

The email address for the 'Sender' header.

replyTostring email

The email address for the 'Reply-To' header.

inReplyTostring

The Message-ID the message is in reply to.

attachDataUrlsboolean

If true, converts data: images in the HTML content to embedded attachments.

watchHtmlstring

Apple Watch specific HTML version of the message.

ampstring

AMP4EMAIL specific HTML version of the message.

icalEventobject

An iCalendar event as an alternative message content.

alternativesobject[]

An array of alternative message content.

encodingstring

Encoding for the text and HTML strings (e.g., 'utf-8', 'hex', 'base64').

rawstring

Custom generated RFC822 formatted message (instead of using Nodemailer generation).

textEncoding'quoted-printable' | 'base64'

Encoding forced to be used for text values.

priority'high' | 'normal' | 'low'

Priority level for the email.

messageIdstring

Optional Message-ID for the 'Message-ID' header.

listobject

Optional object of List-* headers.

requireTLSboolean

If true, requires TLS for the entire delivery chain (RFC 8689). The message will only be transmitted over TLS-encrypted connections.

Response

Email sent successfully

messagestring

Example response

{
  "message": "Email sent successfully"
}

Changes

No recorded changes to this operation across all 1 revision of this API.