[PR #103] [MERGED] feat: add per-email webhook configuration with customizable payloads #107

Closed
opened 2026-02-25 23:39:56 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/HaschekSolutions/opentrashmail/pull/103
Author: @Lars-
Created: 7/9/2025
Status: Merged
Merged: 7/24/2025
Merged by: @geek-at

Base: masterHead: master


📝 Commits (1)

  • 0e93c6d feat: add per-email webhook configuration with customizable payloads

📊 Changes

7 files changed (+692 additions, -10 deletions)

View changed files

📝 CHANGELOG.md (+7 -0)
📝 README.md (+140 -3)
📝 python/mailserver3.py (+136 -6)
tools/test_webhook.py (+145 -0)
📝 web/inc/OpenTrashmailBackend.class.php (+102 -0)
📝 web/inc/core.php (+40 -1)
📝 web/templates/email-table.html.php (+122 -0)

📄 Description

Implements webhook support as requested in #96 by @d33pcode.

What's New

  • Configure webhooks per email address (not just globally)
  • Customizable JSON payload templates with placeholders
  • Web UI for easy configuration (button on email address page)
  • Retry mechanism with exponential backoff
  • HMAC-SHA256 signature support for security

API Endpoints

  • GET /api/webhook/get/[email]
  • POST /api/webhook/save/[email]
  • POST /api/webhook/delete/[email]

Example Payload Template

{
  "email": "{{to}}",
  "from": "{{from}}",
  "subject": "{{subject}}",
  "body": "{{body}}",
  "attachments": {{attachments}}
}

Testing

Tested with included tools/test_webhook.py script. All existing functionality remains unchanged.

Closes #96


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/HaschekSolutions/opentrashmail/pull/103 **Author:** [@Lars-](https://github.com/Lars-) **Created:** 7/9/2025 **Status:** ✅ Merged **Merged:** 7/24/2025 **Merged by:** [@geek-at](https://github.com/geek-at) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`0e93c6d`](https://github.com/HaschekSolutions/opentrashmail/commit/0e93c6dad35408067d0c05382d575af43959116c) feat: add per-email webhook configuration with customizable payloads ### 📊 Changes **7 files changed** (+692 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+7 -0) 📝 `README.md` (+140 -3) 📝 `python/mailserver3.py` (+136 -6) ➕ `tools/test_webhook.py` (+145 -0) 📝 `web/inc/OpenTrashmailBackend.class.php` (+102 -0) 📝 `web/inc/core.php` (+40 -1) 📝 `web/templates/email-table.html.php` (+122 -0) </details> ### 📄 Description Implements webhook support as requested in #96 by @d33pcode. ## What's New - Configure webhooks per email address (not just globally) - Customizable JSON payload templates with placeholders - Web UI for easy configuration (button on email address page) - Retry mechanism with exponential backoff - HMAC-SHA256 signature support for security ## API Endpoints - `GET /api/webhook/get/[email]` - `POST /api/webhook/save/[email]` - `POST /api/webhook/delete/[email]` ## Example Payload Template ```json { "email": "{{to}}", "from": "{{from}}", "subject": "{{subject}}", "body": "{{body}}", "attachments": {{attachments}} } ``` ## Testing Tested with included `tools/test_webhook.py` script. All existing functionality remains unchanged. Closes #96 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:39:56 +03:00
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#107
No description provided.