Email-Webhook
Email-Webhook is a service that allows you to forward your emails to a webhook.
Finally, you can treat your emails as RESTful events!
Why Email-Webhook?
Email is the most common form of communication on the internet, used by billions of people every day. Even "email replacement" services like Slack and Discord rely on email for notifications!
The main problem with email is that it's not very developer-friendly. It's hard to consume from web applications, and it's often difficult to integrate with other services.
Most developers who want to integrate with email end up writing a polling architecture, checking for new emails every few seconds to hours. This approach is highly inefficient.
Email-Webhook solves this problem by allowing you to forward your emails to a REST endpoint of your choosing. This means that you can treat your emails as RESTful events, and consume them in real-time from your web applications.It opens the door to a whole new world of possibilities, such as:
How Does It Work?
When you sign up for Email-Webhook, you will receive a unique email address. Forward your emails to this address, and they will be automatically sent to your webhook(s).
You can create multiple webhooks: one for each sender, and a catch-all webhook for all emails.
Creating a Webhook
When creating a webhook, you can specify the following options:
You can set each webhook to be active or inactive, and you can delete them at any time.
How the Data is Sent
JSON Payload
When an email is received, Email-Webhook will send a POST
, PUT
, DELETE
, or PATCH
request to your webhook URL with the following JSON payload:
{
"from": "the_sender@address",
"to": "the_receiver@address",
"subject": "The email subject",
"body": "The email body",
"attachments": [
{
"filename": "attachment1.txt",
"content": "base64-encoded-content"
},
{
"filename": "attachment2.jpg",
"content": "base64-encoded-content"
}
]
}
Query Parameters
You can also choose to send data to the webhook as a GET
request with query parameters. In this case, the data will be sent as follows:
https://your-webhook-url?from=the_sender@address&to=the_receiver@address&subject=The%20email%20subject&body=The%20email%20body
💡 Note: We recommend using the JSON payload method, as it is more flexible and can handle attachments.
Headers
By default, Email-Webhook will send the following headers:
Content-Type
with value application/json
User-Agent
with value email-webhook/1.0
X-Email-Webhook-Id
with a string that will uniquely identify your message, to aid your debugging.You can override these headers by setting their value to an empty string in the webhook settings page.