---
title: "Send a standard email"
method: POST
path: "/email/send"
tags: ["EMAILS"]
---

# Send a standard email

`POST /email/send`

Send an email by passing a JSON email object

## Request body

- object
  - `sender` string, required — The name and email address to send from, in the format `Name <name@example.com>`
  - `to` string[], required — An array of names and email addresses (up to 100) to send to, in the format `Name <name@example.com>`
  - `cc` string[] — An array of names and email addresses (up to 100) to CC, in the format `Name <name@example.com>`
  - `bcc` string[] — An array of names and email addresses (up to 100) to BCC, in the format `Name <name@example.com>`
  - `subject` string — The subject of the email to be sent, <strong>Note:</strong> if <code>template_id</code> if passed this field is ignored.<br /><br />If you would like to set a custom subject in the <code>template_data</code>, use a variable (<code>{{custom_subject}}</code> for instance) as the value of the templates <em>subject</em> and then set its value in <code>template_data</code> respectively.
  - `html_body` string — A HTML encoded email body. Either <code>html_body</code> or <code>text_body</code> is required if <code>template_id</code> is not passed. If <code>template_id</code> is passed this field is ignored.<br><br> <strong>Warning:</strong><ul><li>To correctly track clicking of URLs you must: <ul><li>Enable click tracking for the API key</li> <li>Insert a full anchor HTML element (not just the URL)</li> <li>Include "https://" at the start of the HREF property</li> </ul></ul>
  - `text_body` string — A plain text email body. Either <code>html_body</code> or <code>text_body</code> is required if <code>template_id</code> is not passed. If <code>template_id</code> is passed this field is ignored.
  - `custom_headers` object[] — An array of custom header objects to be applied to the email. For example, a `Reply-To` email can be specified here, with header `Reply-To` and value `name@example.com`. For sending purposes the following headers are not allowed `Content-Type`, `Content-Transfer-Encoding` and `MIME-Version`.
    - `header` string, required — Custom header to add to the email
    - `value` string, required — Custom header value to set
  - `attachments` object[] — An array of attachment objects to be attached to the email
    - `filename` string, required — The filename to use for this binary data
    - `fileblob` string — The Base64 encoded binary data of the file. Required if no url is specified.
    - `mimetype` string — The mimetype of the binary data
    - `url` string — A URL pointing to the attachment data. The data is directly retrieved by our system, and cached for fast re-use for 24 hours. Required if no fileblob is specified
  - `inlines` object[] — An array of images to be inlined into the email. Use an image in content as `<img src="cid:filename"/>`
    - `filename` string, required — The filename to use for this binary data
    - `fileblob` string — The Base64 encoded binary data of the file. Required if no url is specified.
    - `mimetype` string — The mimetype of the binary data
    - `url` string — A URL pointing to the attachment data. The data is directly retrieved by our system, and cached for fast re-use for 24 hours. Required if no fileblob is specified
  - `template_id` string — The ID of the template you wish to use
  - `template_data` string, json — When a template_id is provided, include the pass-through values in the format `{"variable1": "value1", "variable2": "value2"}`
  - `schedule` string — A timestamp that when passed allows you to schedule an email for sending. Must be in the future and within the next 3 days.<br />The api response will include a `schedule_id` property which can then be used alongside webhooks (An `X-Smtp2go-Schedule-Id` header is added to the sent email corresponds to this id). A total of 50,000 emails can be queued at any one time.
  - `fastaccept` boolean — If true, the email will be accepted immediately and sent in a background process. Use webhooks if you need information about final delivery to the recipient. This will soon become the default method of sending via API.

## Response `200`

Email sent

- object
  - `request_id` string, required
  - `data` object, required
    - `failed` integer — The number of emails that failed to send.<br><br>Note: An email with multiple recipients is classed as 1 email. Only returned if 'fastaccept' is false.
    - `failures` unknown[] — An array containing any error messages encountered during sending. Only returned if 'fastaccept' is false.
      - unknown
    - `succeeded` integer — The number of emails that were successfully sent.<br><br>Note: An email with multiple recipients is classed as 1 email. Only returned if 'fastaccept' is false.
    - `email_id` string, required — The email ID generated if successfully sent
    - `schedule_id` string — The schedule ID generated if queued for sending. Only returned if 'schedule' is passed.

## Other responses

- `400` — 400

---

[API](https://skmtc.net/smtp2go/apis/smtp2go-api-v3-0-4.md) · [All operations](https://skmtc.net/smtp2go/apis/smtp2go-api-v3-0-4/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smtp2go/smtp2go-api-v3-0-4/revisions/1ba6b25eebb9/schema)
