mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 09:37:02 +00:00
* event: Use pointers for InboundMessage addresses To ease conversions to/from MessageMetadata Signed-off-by: James Hillyerd <james@hillyerd.com> * message: test StoreManager.MailboxForAddress() Signed-off-by: James Hillyerd <james@hillyerd.com> --------- Signed-off-by: James Hillyerd <james@hillyerd.com>
34 lines
657 B
Go
34 lines
657 B
Go
package event
|
|
|
|
import (
|
|
"net/mail"
|
|
"time"
|
|
)
|
|
|
|
// AddressParts contains the local and domain parts of an email address.
|
|
type AddressParts struct {
|
|
Local string
|
|
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
|
|
ID string
|
|
From *mail.Address
|
|
To []*mail.Address
|
|
Date time.Time
|
|
Subject string
|
|
Size int64
|
|
Seen bool
|
|
}
|