Email Yak Documentation
Navigation
  • Main Page
  • Quick Start Guide
  • How it works
  • Setup Your Domain
  • Sandbox
  • POST Requests
  • GET Requests
  • Domain Ownership
  • SPF Record
  • Push Email
  • Push Notifications
  • Parsed Data
  • Post Authentication
  • Status Codes
  • Register Domain
  • Register Address
  • Send Email
  • Get Email
  • Get Email List
  • Get All Email
  • Get New Email
  • Delete Email

Push Notifications

When an email is received that matches a domain or email address with a CallbackURL set, a POST request will be sent to the CallbackURL with information about the email.

The request will have the default Content-Type of "application/x-www-form-urlencoded" - most web frameworks accept this format by default.

If anything but a HTTP status 200 is returned, the push will be retried every 5 minutes for the next 120 hours until a 200 response is received. 

Requirements

To receive push notifications, there are two requirements:
  • A public URL must be made available that accepts POST requests
  • Register a Domain or Address with the CallbackURL set to the public URL

POST Headers

The POST request will have these headers set by Email Yak:
  • Content-Type: application/x-www-form-urlencoded
  • X-Emailyak-Post-Auth: HMAC hex-digest of your API key and the raw body of the POST request. To find out more info, see Post Authentication.

POST Input Data

EmailID -  an 8-character string. The random email ID assigned to the email.

ToAddress - a string up to 255 characters. The email address that received the email.

FromAddress - a string up to 255 characters. The email address that sent the email.

POST Input Data Example

"EmailID": "abcd1234"
"FromAddress" : "sender@example.com"
"ToAddress" : "receiver@example.com"

Terminal Example

$: curl --request POST "http://yourdomain.com/CallbackURL/" \
--verbose \
--data 'EmailID=abcd1234&ToAddress=receiver@example.com&FromAddress=sender@example.com'

Create a free website with Weebly