Send email

Send a email with our API

curl https://api.acymailer.com/api/send \
 -X POST \
 -H 'Content-Type: application/json' \
 -H 'API-KEY: your-license-key' \
 -H 'Version: external' \
 -d '{"email":"Date: Thu, 7 Mar 2024 12:15:03 +0100\r\nFrom: Email example <email@example.com>\r\nCc: cc@recipients.com\r\nReply-To: Email no-reply <no-reply@example.com>\r\nMessage-ID: <fFkkPmogsPGI9joSa6txvJno0DBX20VhMQgu6Hk6Q@rleclercq-A027-I00000>\r\nX-Mailer: PHPMailer 6.9.1 (https:\/\/github.com\/PHPMailer\/PHPMailer)\r\nMIME-Version: 1.0\r\nContent-Type: multipart\/alternative;\r\n boundary=\"b1=_fFkkPmogsPGI9joSa6txvJno0DBX20VhMQgu6Hk6Q\"\r\nContent-Transfer-Encoding: 8bit\r\nTo: email@recipients.com\r\nSubject: This is the subject\r\n\r\n--b1=_fFkkPmogsPGI9joSa6txvJno0DBX20VhMQgu6Hk6Q\r\nContent-Type: text\/plain; charset=us-ascii\r\n\r\nThis is the alternative body. Only text here\r\n\r\n--b1=_fFkkPmogsPGI9joSa6txvJno0DBX20VhMQgu6Hk6Q\r\nContent-Type: text\/html; charset=us-ascii\r\n\r\nThis is the body with a <h1>title<\/h1> and a <a href=\"https:\/\/www.acymailing.com\">link<\/a>.\r\n\r\n\r\n--b1=_fFkkPmogsPGI9joSa6txvJno0DBX20VhMQgu6Hk6Q--\r\n","domainsUsed":["example.com"]}'

POST /api/send

Send an email with the API

Headers

Name
Value

Content-Type

application/json

API-KEY

<license-key>

Version

Must be "external"

Body

{
    "email":"Date: Thu, 7 Mar 2024 12:15:03 +0100\r\nFrom: Email example <email@example.com>\r\nCc: cc@recipients.com\r\nReply-To: Email no-reply <no-reply@example.com>\r\nMessage-ID: <fFkkPmogsPGI9joSa6txvJno0DBX20VhMQgu6Hk6Q@rleclercq-A027-I00000>\r\nX-Mailer: PHPMailer 6.9.1 (https:\/\/github.com\/PHPMailer\/PHPMailer)\r\nMIME-Version: 1.0\r\nContent-Type: multipart\/alternative;\r\n boundary=\"b1=_fFkkPmogsPGI9joSa6txvJno0DBX20VhMQgu6Hk6Q\"\r\nContent-Transfer-Encoding: 8bit\r\nTo: email@recipients.com\r\nSubject: This is the subject\r\n\r\n--b1=_fFkkPmogsPGI9joSa6txvJno0DBX20VhMQgu6Hk6Q\r\nContent-Type: text\/plain; charset=us-ascii\r\n\r\nThis is the alternative body. Only text here\r\n\r\n--b1=_fFkkPmogsPGI9joSa6txvJno0DBX20VhMQgu6Hk6Q\r\nContent-Type: text\/html; charset=us-ascii\r\n\r\nThis is the body with a <h1>title<\/h1> and a <a href=\"https:\/\/www.acymailing.com\">link<\/a>.\r\n\r\n\r\n--b1=_fFkkPmogsPGI9joSa6txvJno0DBX20VhMQgu6Hk6Q--\r\n",
    "domainsUsed":["example.com"],
    "isTransactional": false
}
  • email must be your email in a MIME format

  • domainUsed must be an array of all domains used in the email for the the 3 email addresses: - From email - Bounce email - Reply-to email

  • isTransactional must be either true or false

For example:

Same domain but different email addresses: - From: marketing@your-domain.com - Reply-to: no-reply@your-domain.com - Bounce: bounce@your-domain.com The value should be ["your-domain.com"]

Different domain and different email addresses: - From: marketing@your-domain.com - Reply-to: no-reply@your-domain.com - Bounce: bounce@your-other-domain.com The value should be ["example.com", "your-other-domain.com"]

Response

{
    "code": 22,
    "message": "Email sent!"
}

Last updated