1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-21 03:27:01 +00:00

extension: BeforeMessageStored event to rewrite envelope (#417)

* extension: add InboundMessage type
* manager: fires BeforeMessageStored event
* manager: Reacts to BeforeMessageStored event response
* manager: Apply BeforeMessageStored response fields to message

Signed-off-by: James Hillyerd <james@hillyerd.com>
This commit is contained in:
James Hillyerd
2023-11-06 14:53:38 -08:00
committed by GitHub
parent 0cb62af074
commit 01fb161df8
11 changed files with 244 additions and 34 deletions

View File

@@ -11,6 +11,15 @@ type AddressParts struct {
Domain string
}
// InboundMessage contains the basic header and mailbox data for a message being received.
type InboundMessage struct {
Mailboxes []string
From mail.Address
To []mail.Address
Subject string
Size int64
}
// MessageMetadata contains the basic header data for a message event.
type MessageMetadata struct {
Mailbox string