Send API | SMTP Express - The Express Emailing Experience for Developers and Businesses

Documentation

Send API

To send an email with SMTP Express, you ideally make an API call to our send API. This has been simplified using our language SDKs but the send API can be interacted with by making a simple POST request to the send API's base URL.

   POST "https://api.smtpexpress.com/send"

This request requires a project secret. If you don't have one, read about Obtaining a Project Secret

Sending an email using HTML or Plain Text

1// npm install smtpexpress
2import { createClient } from "smtpexpress"
3const smtpexpressClient = createClient({...});
4
5smtpexpressClient.sendApi.sendMail({
6  subject: "A message from the express",
7  message: "<h1> Welcome to the future of Email Delivery </h1>",
8  sender: {
9    name: "Tenotea",
10    email: "tenotea@smtpexpress.com"
11  },
12  recipients: {
13    name: "My recipient's name", 
14    email: "recipient@recipients.com"
15  }
16});

Request Parameters

subject *

String

The email subject line is the first single-line text recipients see, after the sender’s name, when they receive an email

message *

String

This contains content of the mail. We provide support for Plain Text, HTML and Markdown

sender *

Object

name *

String

The name of the sender quickly establishes trust with the recipient(s). Make sure it is relevant and correctly identifies the source of the email

email *

String

The email of the sender of the email. A custom eamil can be used if your project was created using a custom SMTP Server. quickly establishes trust with the recipient(s). Make sure it is relevant and correctly identifies the source of the email

recipients *

String | Object |
StringArray | ObjectArray

For a single recipient, it is recommended to provide the email address of the recipient as the recipient value. For detailed record-keeping, you can provide an object that includes the name and email of the recipient.

If you're sending to multiple recipients, you can provide the emails in an array of strings, and again for detailed record-keeping, you can provide an array of the recipient object.

name

String

The name of the recipient for detailed record keeping

email *

String

The email address you want your message to get delivered to

responseAddress

Object

name

String

The name of the recipient of the response. Make sure it is relevant and correctly identifies the recipient of the email

email *

String

The email of the recipient of the response. Must be a valid email address