• Account
  • PricingIt's good.
  • FeaturesBenefits and uses of Elastic Email.
  • CustomersA few of our great customers
  • BlogNews, events and email tips
  • ResourcesSMTP Config and API specs
  • Get CreditPurchase credit to send emails
  • SupportSupport and help for Elastic Email
  • ContactWays to contact us
SMTP Relay
  • Home
  • FeaturesThings you can do with Elastic Email.
  • PricingPricing and costs of using Elastic Email
  • ResourcesDocumentation of our API
  • Get CreditGet Credit for your Elastic Email account
  • ContactContact us
  • Your AccountAccess your elastic email account.
Edit - Delete
Text AreaText Area - Table of Contents
API-Documentation Table of Contents
Edit - Delete
Text AreaText Area - Send Mass Email

Send Mass Email

The send command is used to send an email to a single recipient or multiple recipients.  

To use the send command POST to https://api.elasticemail.com/mailer/send with the following form values:

  • username=your account email address
  • api_key=your api key
  • from=from email address
  • from_name=display name for from email address
  • to=semi colon separated list of email recipients (each email is treated separately, like a BCC)
  • subject=email subject 
  • body_html=html email body [optional]
  • body_text=text email body [optional]
  • reply_to=email address to reply to [optional]
  • reply_to_name=display name of the reply to address [optional]
  • channel=an id field (max 60 chars) that can be used for reporting [optional - will default to from address]
  • charset=text value of encoding for example: iso-8859-1, windows-1251, utf-8, us-ascii, windows-1250 and more…
  • encodingtype=0 for None, 1 for Raw7Bit, 2 for Raw8Bit, 3 for QuotedPrintable, 4 for Base64 (Default), 5 for Uue  note that you can also provide the text version such as "Raw7Bit" for value 1.  NOTE: Base64 or QuotedPrintable is recommended if you are validating your domain(s) with DKIM.

Optional Templates and contact lists:
  • template=the name of an email template you have created in your account. If you send a template [optional]
  • merge_firstname,merge_lastname= if sending to a template you can send merge_ fields to merge data with the template. Template fields are entered with {firstname}, {lastname} etc. [optional]

  • lists=the name of a contact list you would like to send to. Separate multiple contact lists by commas. [optional]

Optional sender header. If you are sending on behalf of many clients with different from addresses use:

  • sender=email address of the sender [optional]
  • sender_name=display name sender [optional]


Optional scheduling. If you would like to schedule your email to be delivered in the future (drip campaigns etc):

  • time_offset_minutes=number of minutes in the future this email should be sent [optional]

Note: When you have more than one recipient in the "to" field each recipient will receive their own individually delivered copy of the email.  Recipients will not see each other's email addresses. 

Response:

If sent correctly you will receive a response like:

f74b9f96-f89a-4cfe-813f-5f86df1cb37f

This is the transaction ID of your send job.  You can use this transaction ID to check on the status of the given job using the Get Status api.

Edit - Delete
Text AreaText Area - Code Samples

Code Samples

Edit - Delete
Html Script BoxHtml Script Box - PHP

PHP

Edit - Delete
Text AreaText Area - PHP
There is also a Zend Framework class for delivering mail via Elastic Email. Special thanks to Marco Pracucci of Spreaker (http://spreaker.com) who provided this:  Zend_Mail_Transport
Edit - Delete
Html Script BoxHtml Script Box - PHP Using CURL

PHP Using CURL

Edit - Delete
Html Script BoxHtml Script Box - C#

C#

Edit - Delete
Html Script BoxHtml Script Box - Java

Java

Edit - Delete
Text AreaText Area - Python

Python

Edit - Delete
Html Script BoxHtml Script Box - New Html Script Box
Edit - Delete
Text AreaText Area - Perl

Perl

Edit - Delete
Html Script BoxHtml Script Box - New Html Script Box
Edit - Delete
Text AreaText Area - ASP.NET

ASP.NET


Edit - Delete
Html Script BoxHtml Script Box - New Html Script Box
Edit - Delete
Text AreaText Area - Force.com

Force.com


Edit - Delete
Html Script BoxHtml Script Box - New Html Script Box
Edit - Delete
Text AreaText Area - Ruby

Ruby


Edit - Delete
Html Script BoxHtml Script Box - New Html Script Box
Edit - Delete
Text AreaText Area - Objective C (iPhone)

Objective C (iPhone)


Edit - Delete
Html Script BoxHtml Script Box - Title
Edit - Delete
Text AreaText Area - Node.js Application

Node.js Application


Edit - Delete
Html Script BoxHtml Script Box - Title
Edit - Delete
Text AreaText Area - Title
If you've written this (or any of our other API calls) in a language we don't have in our samples send us your working code and we'll put a bonus $50 of Elastic Email credit in your account as a big thank you!

Elastic Email

About Us
Terms of Use and Email Policy
Privacy Policy        
Report Spam

Resources

API Documentation
SMTP Configuration Instructions 
Send Mail
Upload Attachment
Activity Log
Mail Merge
Contact List Management

Support

Blog
Knowledge Base
Forums
Support Home

Social

Facebook
Twitter
Linked In
Google+