Documentation
¶
Overview ¶
Package mailer sends email through blackhole, SMTP, AWS SES v2, or Resend backends and includes helpers for verification links.
Index ¶
- func Addr() string
- func BuildVerifyURL(base, path, token string) (string, error)
- func Close()
- func Init(from, smtpAddr, smtpUsername, smtpPassword, region, resendAPIKey, ... string)
- func IsBlackhole() bool
- func LastError() string
- func Send(ctx context.Context, to, subject, text, html string) error
- func UseBlackHole()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildVerifyURL ¶
BuildVerifyURL builds a verification link.
func Init ¶
func Init(from, smtpAddr, smtpUsername, smtpPassword, region, resendAPIKey, resendAPIBaseURL string)
Init configures the process-wide mailer backend.
Exactly one delivery backend may be configured: SMTP via smtpAddr, AWS SES via region, or Resend via resendAPIKey. With no backend and no from address, the mailer uses the blackhole backend.
func IsBlackhole ¶
func IsBlackhole() bool
IsBlackhole reports whether the blackhole backend is active.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.