HTTP Web Notification
These features will set up "webhooks" for your account. They work with custom scripts hosted at the URLs specified by the user in the settings. These are considered "advanced" settings that are part of our HTTP API. To find the webhook feature, please go to the Notifications section of your Settings screen.
Notification URL – URL of the hosted script on your server used to catch notifications from our platform. In order to validate, the script needs to return a ‘200 OK’ status and accept GET request. If for any reason your code stops parsing data from us, we will turn off notifications after 1000 failures due to security measures. The notification URL can be inserted here:
Notify On – You can specify which email status will prompt the HTTP notification by checking which statuses to "Notify On".
You can choose from:
Sent – when you want to receive notifications for sent emails,
Opened – when you want to receive notifications for opened emails,
Clicked – when you want to receive notifications for clicked emails,
Unsubscribed – when you want to receive notifications about users unsubscribing from your email,
Complaints – when you want to receive notifications for all types of complaints,
Bounce / Error– when you want to receive notifications for bounced emails.
These are the parameters that are passed with every notification.
from - sender's email address
to - recipient's email address
date - date and time of the event, UTC
subject - subject of an email
status - Sent, Opened, Clicked, *Error, **AbuseReport, Unsubscribed
channel - name of the channel corresponding to this job
account - account's email address
category - message category of bounced email
messageid - The MessageID of an email
transaction - The TransactionID of an email. A string guide returned by/mailer/send
*Bounces also fall into this status
**Complaints also fall into this status
For opens and clicks only:
IP - IP address of the recipient
Useragent - software used by the recipient to receive emails
Country - recipient's country of residence
State - recipient's state of residence
City - recipient's city of residence
The "category" parameter can have following values:
BlackListed (Identical to "Poor reputation" bounce category)
target - URL address of clicked link which is notified
postback - (optional) - custom header you can provide on submitting. You must first turn on "Allow custom headers" on your account's Sending Settings screen. You can pass as many custom postback headers as you want.
Plain text example:
http://email@example.com&date=3/10/2012 10:20:30 AM&status=Clicked&channel=your channel firstname.lastname@example.org
The request will be URL encoded:
You can see your notifications when you enter Activity>View>Notification Log:
Inbound Email Notification
Reroute your inbound notifications either to an HTTP URL or an inbox set up on your own domain. You can create multiple routes and change their order or stop them entirely.
You can set up the Inbound Notification to be forwarded:
There is also an option to "Stop" inbound email notifications. This way all emails will be sent to our servers but will not be forwarded anywhere.
If you send emails using your main email address (email@example.com), but you would like to receive emails on a different email address (e.g. firstname.lastname@example.org) you must first configure the redirection in the MX records for your domain and then turn this setting on. The emails will be picked up by our platform, parsed and sent as post data to your URL.
Update your domain's MX Record "mx.yourdomain.com". Change it to "mx.inbound.elasticemail.com".
Emails sent to "email@example.com" will get captured and parsed by our system and then sent as a web notification to your web server or application. Inbound emails are charged at the same rate as the account's pricing level.
Notification POST Parameters
from_email (from address)
from_name (from name)
env_from (envelope from address - MAIL FROM)
env_to_list (list of envelope to addresses - RCPT TO, separated by CRLF)
to_list (list of email addresses the email was sent to separated by /r/n)
header_list (email headers as HeaderName: HeaderValue separated by /r/n)
subject (email subject)
body_text (text body content)
body_html (html body content)
You can also receive any custom postback header as described in the previous section.
All code samples are licensed under MIT license.