API Guide - Part I - Sending a Message


Base URL and Structure

https://services.reachmail.net

Nearly all endpoint requires the AccountId in the URL path like this

/easysmtp/{accountid} or /Reports/Easysmtp/{accountid}

See here for more info on finding Retrieving your AccountId

Sending a Basic Message

Now that you have your account UUID, you can move on to the second step of scheduling the message.  

URI: https://services.reachmail.net/easysmtp/{AccountId}

Full Documentation here: http://services.reachmail.net/#EasySMTP@/easysmtp

This uses a POST method to provide what is needed to make your email.  Here is an example of the JSON one might pass in:

{
"FromAddress": "from@my-domain.com",
"Recipients": [
{
"Address": "to@customer-domain.com"
}
],
"Subject": "Test Subject Goes Here",
"Headers": {
"From": "My Name <from@my-domain.com>"
},
"BodyHtml": "this is the HTML MIME part of the same email <a href=\"http://www.google.com\">HTML</a> version of the ES API test",
"Tracking": true
}

 

API wrappers for assorted languages can be found here.  While not necessary, they may be helpful in getting started.

Advanced Endpoint

The advanced delivery endpoint supports:

  • Personalizations for string substitutions in content. (aka mail-merge tags)
  • Recipient specific and Message specific Headers for dynamic header creation (e.g. To or
  • Multiple concurrent MIME types and encodings for an assortment of attachments.

The Advanced Endpoint's flexibility makes it the preferred choice for senders with the more dynamic message content.

In the following example, each recipient has different CC headers, their own Subject line, and Personalization tags are used to personalize the content with recipients, First Name, and with a dynamic link URL for their report.

{
"Personalizations": [
{
"To": {
"Name": "One Name",
"Email": "to_one@customer-domain.com"
},
"Subject": "Report ABC for you.",
"Headers": {
"CC": "Two Name <to_two@customer-domain.com>"
},
"Substitutions": {
"firstname": "One",
"reportid": "123456"
}
},
{
"To": {
"Name": "Two Name",
"Email": "to_two@customer-domain.com"
},
"Subject": "Report XYZ for you.",
"Headers": {
"CC": "One Name <to_one@customer-domain.com>",
"CC": "Supervisor Name <supervisor@my-domain.com>"
},
"Substitutions": {
"firstname": "Two",
"reportid": "678910"
}
}
],
"From": {
"Name": "My Name and/or Company",
"Email": "from@my-domain.com"
},
"ReplyTo": {
"Name": "My Name and/or Company",
"Email": "from@my-domain.com"
},
"Contents": [
{
"Type": "text/html",
"Content": "<html><body><p>Dear {{firstname}}, <br><br>Here are the <a href=\"https://my-domain.com/documents?id={{reportid}}\">files you requested</a>.</p></html></body>"
}
],
"Headers": {
"X-Campaign": "Sales Summary Report",
"CC": "Boss Name <boss@my-domain.com>"
},
"Settings": {
"Tracking": true
}
}

Full documentation can be found here: https://services.reachmail.net/#resources/EasySmtp/Advanced

 

 

×

Contact Us

Support Resources

ReachMail is here to help. If you have any questions, please use the form below or contact us at:

Support Hours: 8am - 6pm (Central Time) Mon-Fri