Transactional API

Transactional Emails can be sent using the Maxemail API, by simply sending the component parts of the email (eg. to, from, subject, content). This has an advantage for developers over Transactional SMTP, as it doesn't require building a fully formatted email message, leaving Maxemail to build it instead.

A single API method is needed: transactional.send

The API method returns a unique identifier for the Transactional Email send, which can be used to match up to Transactional Email reports.

The examples below show how this might be used in different programming languages.

curl --request POST \
--url \
--basic --user \
-d "method=send" \
-d "" \
-d "" \
-d "fromAlias=Oxford Stones" \
-d "subject=Latest Newsletter from Oxford Stones" \
-d "htmlContent=<html><body>Email HTML content</body></html>" \
-d "textContent=Email text content" \
-d 'options={"tags":["order", "confirmation", "guest"]}'

Use the PHP API Client to connect to the API.

$api = new \Emailcenter\MaxemailApi\Client([
    'username' => '',
    'password' => 'password123'
$trxKey = $api->transactional->send(
    'Oxford Stones',
    'Latest Newsletter from Oxford Stones',
    '<html><body>Email HTML content</body></html>',
    'Email text content',
        'tags' => ['order', 'confirmation', 'guest']