FracturedAtlas.org API : Email Sending
To use the API , you’ll first need an API Key.
Accepts a POST request at http://www.fracturedatlas.org/api/API_KEY_GOES_HERE/Mailer/send
Mandatory parameters
to
One or more “To” recipients. Send multiple recipients by using PHP array syntax, e.g.,
to[] => guy@example.com
to[] => anotherguy@example.com
from
Email address for the “From” header.
subject
Subject line
Optional parameters
body[text]
Plain text body of the email
body[html]
HTML body of the email
headers[N]
0-N arbitrary headers, defined as in the following example:
headers[0][header] => X-Foo
headers[0][value] => Bar
headers[1][header] => Reply-to
headers[1][value] => me@mysite.com
headers[2][header] => Return-path
headers[2][value] => bouncebin@mysite.com
attachments[N]
0-N attachments, defined as in the following example:
attachments[0][file] => THE_CONTENTS_OF_THE_FILE
attachments[0][name] => Document.pdf
attachments[0][mimetype] => application/pdf
attachments[1][file] => THE_CONTENTS_OF_ANOTHER_FILE
attachments[1][name] => Numbers.xls
attachments[1][mimetype] => application/x-excel
php
– a serialized associative array (default)
json
Sample send responses (in JSON format)
{"status":"error","message":"Unsuccessful send attempt"}
{"status":"success", "message":"Email sent"}