merge v0.23.0-rc changes
This commit is contained in:
@@ -3,6 +3,8 @@ package mailer
|
||||
import (
|
||||
"io"
|
||||
"net/mail"
|
||||
|
||||
"github.com/pocketbase/pocketbase/tools/hook"
|
||||
)
|
||||
|
||||
// Message defines a generic email message struct.
|
||||
@@ -24,6 +26,16 @@ type Mailer interface {
|
||||
Send(message *Message) error
|
||||
}
|
||||
|
||||
// SendInterceptor is optional interface for registering mail send hooks.
|
||||
type SendInterceptor interface {
|
||||
OnSend() *hook.Hook[*SendEvent]
|
||||
}
|
||||
|
||||
type SendEvent struct {
|
||||
hook.Event
|
||||
Message *Message
|
||||
}
|
||||
|
||||
// addressesToStrings converts the provided address to a list of serialized RFC 5322 strings.
|
||||
//
|
||||
// To export only the email part of mail.Address, you can set withName to false.
|
||||
|
||||
Reference in New Issue
Block a user