Documentation
¶
Overview ¶
Package smtp is the Lazuli @plugin/smtp adapter — wire-thin wrapper around github.com/wneessen/go-mail for RFC-compliant MIME multipart email (HTML+text alternative, STARTTLS, OAuth2 SMTP).
Index ¶
Constants ¶
View Source
const AdapterRef = "@plugin/smtp"
Variables ¶
View Source
var ErrUnconfigured = errors.New("smtp: SMTP_HOST not set")
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
func (*Adapter) SendEmailBatch ¶
SendEmailBatch dials once and sends N messages on one connection. Per-message errors share the input length; the second return is non-nil only when the dial/auth itself failed.
type EmailMessage ¶
type EmailMessage struct {
From, Subject, HTMLBody, TextBody string
To []string
Headers map[string]string
}
EmailMessage is the in-plugin contract; hoists to notifications.EmailSender when the framework slot lands.
type EmailSender ¶
type EmailSender interface {
SendEmail(ctx context.Context, msg EmailMessage) error
SendEmailBatch(ctx context.Context, msgs []EmailMessage) ([]error, error)
}
Click to show internal directories.
Click to hide internal directories.