Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmailDisabled = errors.New("email is disabled")
ErrEmailDisabled indicates email feature is not enabled
Functions ¶
func IsValidEmail ¶
IsValidEmail performs email validation using RFC 5322 parsing
Types ¶
type Config ¶
type Config struct {
Enabled bool
Host string
Port int
Username string
Password string
From string // format: "Display Name <email>" or just "email"
TLS bool // implicit TLS (port 465)
StartTLS bool // STARTTLS upgrade (port 587)
InsecureSkipVerify bool // skip certificate verification
LoginAuth bool // use LOGIN auth instead of PLAIN
Timeout time.Duration
Template string // path to custom template file (optional)
Branding string // application name for email footer
BrandingURL string // link URL for branding in email footer
Notifier Notifier // optional, for testing; if nil, creates default SMTP notifier
}
Config contains SMTP configuration
type Request ¶
type Request struct {
To string // recipient email address
Subject string // email subject
FromName string // display name for From header
Link string // the secret link to include in email body
}
Request contains all parameters for sending an email
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
Sender sends emails with secret links using go-pkgz/notify
func (*Sender) GetDefaultFromName ¶
GetDefaultFromName returns the cached default from name
Click to show internal directories.
Click to hide internal directories.