[GH-ISSUE #96] [FEATURE] Support for Custom Webhooks for specific email address #72

Closed
opened 2026-02-25 23:39:46 +03:00 by kerem · 1 comment
Owner

Originally created by @d33pcode on GitHub (Jan 28, 2025).
Original GitHub issue: https://github.com/HaschekSolutions/opentrashmail/issues/96

Hello,

I would like to propose an enhancement for OpenTrashMail that adds support for custom webhooks configured per email address. This feature would allow users to define:

  1. The external API endpoint to be called.
  2. A customizable JSON payload to be sent to that endpoint.

This enhancement would greatly improve the integration capabilities of OpenTrashMail for various automation scenarios.

Use Case

Currently, OpenTrashMail is a great tool for managing temporary emails, but it lacks the flexibility to act as an automation trigger based on incoming emails.

For example, I might want to send the email content to different APIs depending on the email address that received it, with each API requiring its own payload structure.

Proposed Functionality

1. Webhook Endpoint Configuration

When creating or managing an email address, users can specify a unique webhook endpoint (API URL) for that address.

Example: https://api.example.com/handle-email.

2. Customizable Payload Template

Allow users to define a JSON payload template for each webhook.

Use placeholders to insert dynamic email data (e.g., {{to}}, {{from}}, {{subject}}, {{body}}).

Example template:

{
  "email_address": "{{to}}",
  "sender": "{{from}}",
  "message_subject": "{{subject}}",
  "message_body": "{{body}}",
  "custom_field": "example_value"
}

3. Triggering the Webhook

When an email is received for an address with a configured webhook, OpenTrashMail will:

  • Replace placeholders in the JSON payload template with actual email data.
  • Send an HTTP POST request to the specified endpoint using the customized payload.

4. Retry Mechanism

Include a retry mechanism for failed webhook calls (e.g., retry 3 times with exponential backoff).

5. Security

Optionally, support signing the payload with a secret key to ensure the webhook requests are secure and verifiable.

Benefits

This feature would allow users to automate workflows by sending tailored data to external systems based on incoming emails.

The configurability of both the API endpoint and the JSON payload makes the solution highly flexible for various use cases.

Thank you for considering this feature! Please let me know if more details or clarifications are needed.

Originally created by @d33pcode on GitHub (Jan 28, 2025). Original GitHub issue: https://github.com/HaschekSolutions/opentrashmail/issues/96 Hello, I would like to propose an enhancement for OpenTrashMail that adds support for custom webhooks configured per email address. This feature would allow users to define: 1. The external API endpoint to be called. 2. A customizable JSON payload to be sent to that endpoint. This enhancement would greatly improve the integration capabilities of OpenTrashMail for various automation scenarios. ## Use Case Currently, OpenTrashMail is a great tool for managing temporary emails, but it lacks the flexibility to act as an automation trigger based on incoming emails. For example, I might want to send the email content to different APIs depending on the email address that received it, with each API requiring its own payload structure. ## Proposed Functionality ### 1. Webhook Endpoint Configuration When creating or managing an email address, users can specify a unique webhook endpoint (API URL) for that address. > Example: https://api.example.com/handle-email. ### 2. Customizable Payload Template Allow users to define a JSON payload template for each webhook. Use placeholders to insert dynamic email data (e.g., {{to}}, {{from}}, {{subject}}, {{body}}). Example template: ```json { "email_address": "{{to}}", "sender": "{{from}}", "message_subject": "{{subject}}", "message_body": "{{body}}", "custom_field": "example_value" } ``` ### 3. Triggering the Webhook When an email is received for an address with a configured webhook, OpenTrashMail will: - Replace placeholders in the JSON payload template with actual email data. - Send an HTTP POST request to the specified endpoint using the customized payload. ### 4. Retry Mechanism Include a retry mechanism for failed webhook calls (e.g., retry 3 times with exponential backoff). ### 5. Security Optionally, support signing the payload with a secret key to ensure the webhook requests are secure and verifiable. ## Benefits This feature would allow users to automate workflows by sending tailored data to external systems based on incoming emails. The configurability of both the API endpoint and the JSON payload makes the solution highly flexible for various use cases. Thank you for considering this feature! Please let me know if more details or clarifications are needed.
kerem closed this issue 2026-02-25 23:39:46 +03:00
Author
Owner

@Lars- commented on GitHub (Jul 9, 2025):

Working on this!

<!-- gh-comment-id:3051933155 --> @Lars- commented on GitHub (Jul 9, 2025): Working on this!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentrashmail#72
No description provided.