This commit is contained in:
1 parent
ed7b960921
commit
6254217972
10 files changed
+136
-10
No files matched your search
@@ -73,6 +73,7 @@ func NewEmailAuthentication(spfPassed, dkimPassed bool) *EmailAuthentication {
|
||||
|
||||
// Email is the type used for email messages
|
||||
type Email struct {
|
||||
EnvelopeFrom string
|
||||
ReplyTo []*User
|
||||
From *User
|
||||
To []*User
|
||||
@@ -93,6 +94,20 @@ type Email struct {
|
||||
Authentication *EmailAuthentication
|
||||
}
|
||||
|
||||
func (e *Email) SenderFilterAddresses() []string {
|
||||
if e == nil {
|
||||
return nil
|
||||
}
|
||||
addresses := []string{e.EnvelopeFrom}
|
||||
if e.From != nil {
|
||||
addresses = append(addresses, e.From.EmailAddress)
|
||||
}
|
||||
if e.Sender != nil {
|
||||
addresses = append(addresses, e.Sender.EmailAddress)
|
||||
}
|
||||
return addresses
|
||||
}
|
||||
|
||||
type StoredEmailFields struct {
|
||||
ReplyTo string
|
||||
To string
|
||||
|
||||
Reference in new issue
Block a user