How to manage HTTP Web Notifications (Webhooks)

HTTP Web Notification and Inbound Email Notification Settings

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.

Please note that the webhook feature is reserved for PRO plans only.

HTTP Web Notification

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. If for any reason your code stops parsing data from us, we will turn off notifications after 1000 failures due to security measures.

See the example: http://www.somehost.com/can/be/anything/

Notify On – You can specify what 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.

URL Parameters

These are the parameters that are passed with every notification. transaction - string guide returned by /mailer/send

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

category - message category of bounced email

Values:

Ignore
Spam
BlackListed
NoMailbox
GreyListed
Throttled
Timeout
ConnectionProblem
SPFProblem
AccountProblem
DNSProblem
WhitelistingProblem
CodeError
ManualCancel
ConnectionTerminated
ContentFilter
NotDelivered
Unknown

target - URL address of clicked link which is notified

postback - (optional) - custom header you can provide on submitting. You must first Enable Custom Headers on the Advance Options screen from your account. You can pass as many custom postback headers as you want.

In API :

postback-MyHeader=value

or

headers_postback-MyHeader=postback-MyHeader: value

In SMTP:

X-ElasticEmail-Postback:value

Example Notification

Plain text example:

http://www.somehost.com/can/be/anything?transaction=a58d3de8-b003-48ba-8e0e-9877c70d264f&to=someone@somehost.com&date=3/10/2012 10:20:30 AM&status=Clicked&channel=your channel name&account=your@account.email.com

The request will be URL encoded:

http://www.somehost.com/can/be/anything?transaction=a58d3de8-b003-48ba-8e0e-9877c70d264f&to=someone%40somehost.com&date=3%2f10%2f2012+10%3a20%3a30+AM&status=Clicked&channel=

Inbound Email Notification

This will allow you to receive web notifications for emails coming to mailboxes that you have registered under your domain.

If you send emails using your main email address (name@yourdomain.com), but you would like to receive emails on a different email address (e.g. name_1@yourdomain.com) 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.

MX Records

Update your domain's MX Record "mx.yourdomain.com". Change it to "mx.inbound.elasticemail.com".
Emails sent to "anything@yourdomain.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.

Domain

Specify the domain for which you want to receive emails: yourdomain.com

Notification URL

http://www.somehost.com/can/be/anything

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)

att1_name=attachment_file_name&att1_content=encoded_to_base64_binary_data

att2_name=attachment_file_name&att2_content=encoded_to_base64_binary_data

You can also receive any custom postback header as described in the previous section.

License

All code samples are licensed under MIT license.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Reselling overview

Learn more about how to resell the Elastic Email service to your own clients. One of the great...

How do the shared IPs work

Your new VMA Emailer account is configured to send mail via free shared IP pools. These IP pools...

How to change your account's credentials

Modification of account's profile information You have the ability to change your account's...

How to configure Exchange 2010 with VMA Emailer

VMA Emailer offers this documentation to put simply the fundamental of SMTP connection with...

How to configure Outlook with VMA Emailer

These are the step by step procedures to add an SMTP server to an existing Outlook 2016 setup....