Sending transactional email with the Mailer API
POST to https://api.madmimi.com/mailer
with the following parameters
promotion_name
Required. The name of the promotion Mimi will send. For raw_html
or raw_plain_text
promotions, Mimi will automatically create or update the promotion in your account.
subject
The subject of the email. Will default to the promotion_name
if not supplied.
from
The from address. Just the email address or in Display Name <email@domain.com>
format.
cc
An email address to CC. Just the email address.
bcc
An email address to BCC. Just the email address.
recipients
Required. The recipient (singular although the parameter name is plural) again just the email or in Display Name <email@domain.com>
format.
raw_html
The custom HTML to send. Can be used on its own or in conjunction with raw_plain_text
.
raw_plain_text
The custom plain text to send. Can be used on its own or in conjunction with raw_html
.
check_suppressed
Checks if the recipient is suppressed and does not send if so (default:off)
WARNING: This parameter must still be included if the transactional email includes an unsubscribe link.
track_links
Enable or disable link tracking in HTML promotions (default: on).
track_views
Enable or disable view tracking in non-custom HTML promotions (default: on).
hidden
Creates the promotion as a hidden promotion so as not to clutter up your web interface (default: off).
body
Required if you have placeholders. YAML encoded replacements for any {placeholders}
in your promotion.
skip_placeholders
If you would like Mimi to ignore any {placeholders}
you can add this optional parameter (default: false).
list_name
or list_names
In addition to sending the email, add the audience member to these lists. This is a CSV encoded list of lists.
Macros
For transactional emails using raw_html
you must include either the [[tracking_beacon]]
or [[peek_image]]
macro (they are aliases). This is used for tracking opens.
You can also include a [[confirmation_link]]
macro in the body of the mail. When it is used, the audience member you're sending to will be suppressed until they click on the confirmation link in the mail.
Boolean parameters
For the boolean parameters like track_links
you can use true
, on
, or yes
for the affirmative, and false
, off
or no
otherwise.
Response
The API will respond with a unique transaction code if successful (use the Transactional Mailing Status method later to discover the status), or could return any one of the Mailer API error codes.