merge v0.23.0-rc changes

This commit is contained in:
Gani Georgiev
2024-09-29 19:23:19 +03:00
parent ad92992324
commit 844f18cac3
753 changed files with 85141 additions and 63396 deletions
+12
View File
@@ -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.