Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalDriver ¶
type LocalDriver struct {
// contains filtered or unexported fields
}
LocalDriver sends emails via SMTP or sendmail. The username and password fields contain sensitive credentials and must not be logged.
func NewLocalDriver ¶
func NewLocalDriver() (*LocalDriver, error)
NewLocalDriver creates a new local SMTP/sendmail driver
func (*LocalDriver) String ¶ added in v0.9.2
func (d *LocalDriver) String() string
String returns a safe representation with credentials redacted.
type LogDriver ¶
type LogDriver struct {
// contains filtered or unexported fields
}
LogDriver logs emails instead of sending them (for development)
func (*LogDriver) ClearLog ¶
func (d *LogDriver) ClearLog()
ClearLog clears the logged emails (for testing)
type MailgunDriver ¶
type MailgunDriver struct {
// contains filtered or unexported fields
}
MailgunDriver sends emails via Mailgun API. The apiKey and webhookSigningKey fields contain sensitive credentials and must not be logged.
func NewMailgunDriver ¶
func NewMailgunDriver() (*MailgunDriver, error)
NewMailgunDriver creates a new Mailgun driver
func (*MailgunDriver) ParseWebhook ¶
func (d *MailgunDriver) ParseWebhook(body []byte) (map[string]interface{}, error)
ParseWebhook parses a Mailgun webhook event (for future use)
func (*MailgunDriver) String ¶ added in v0.9.2
func (d *MailgunDriver) String() string
String returns a safe representation with credentials redacted.
func (*MailgunDriver) VerifyWebhookSignature ¶
func (d *MailgunDriver) VerifyWebhookSignature(timestamp, token, signature string) bool
VerifyWebhookSignature verifies a Mailgun webhook signature using HMAC-SHA256. The signature is computed as HMAC-SHA256(webhookSigningKey, timestamp+token).
type PostmarkDriver ¶
type PostmarkDriver struct {
// contains filtered or unexported fields
}
PostmarkDriver sends emails via Postmark API. The token field contains sensitive credentials and must not be logged.
func NewPostmarkDriver ¶
func NewPostmarkDriver() (*PostmarkDriver, error)
NewPostmarkDriver creates a new Postmark driver
func (*PostmarkDriver) String ¶ added in v0.9.2
func (d *PostmarkDriver) String() string
String returns a safe representation with credentials redacted.