Send a standard email

Send an email by passing a JSON email object

Body Params
string
required

The name and email address to send from, in the format Name <[email protected]>

to
array of strings
required

An array of names and email addresses (up to 100) to send to, in the format Name <[email protected]>

to*
cc
array of strings

An array of names and email addresses (up to 100) to CC, in the format Name <[email protected]>

cc
bcc
array of strings

An array of names and email addresses (up to 100) to BCC, in the format Name <[email protected]>

bcc
string
required

The subject of the email to be sent

string

A HTML encoded email body. Either html_body or text_body is required if template_id is not passed.

Warning:

  • To correctly track clicking of URLs you must:
    • Enable click tracking for the API key
    • Insert a full anchor HTML element (not just the URL)
    • Include "https://" at the start of the HREF property

string

A plain text email body. Either html_body or text_body is required if template_id is not passed

custom_headers
array of objects

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 [email protected]. For sending purposes the following headers are not allowed Content-Type, Content-Transfer-Encoding and MIME-Version.

custom_headers
attachments
array of objects

An array of attachment objects to be attached to the email

attachments
inlines
array of objects

An array of images to be inlined into the email. Use an image in content as <img src="cid:filename"/>

inlines
string

The ID of the template you wish to use

json

When a template_id is provided, include the pass-through values in the format {"variable1": "value1", "variable2": "value2"}

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.
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.

boolean
Defaults to false

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.

Responses

Language
Credentials
Header
URL
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json