• Your Account
  • Pricing
  • FeaturesFeatures and Benefits of Elastic Email
  • CustomersA few of our great customers
  • BlogHome of Elastic Email's Blog
  • API Documentation
  • Get CreditPurchase credit to send emails
  • SupportSupport and help for Elastic Email
  • ContactContact form to send an email to us
SMTP Relay
  • Home
  • FeaturesFeatures and Benefits of Elastic Email
  • PricingPricing and costs of using Elastic Email
  • DocsDocumentation 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 Email

Send 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]

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]

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]

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.

**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. 

Important: We recommend that you setup n Sender Policy Framework (SPF) record for you domain to authorize Elastic Email to send email on your behalf.  View Details for configuring your SPF record. 
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 - 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 - 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!
Terms of Use       Privacy Policy
© Copyright 2010-2011 Geographical Media Inc. - About Us