Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingConfig = errors.New("missing required configuration") ErrTemplateNotFound = errors.New("template file not found") ErrTemplateParseFailed = errors.New("failed to parse template") ErrTemplateMissingVars = errors.New("template missing required variables") ErrSMTPConnectionFailed = errors.New("failed to connect to SMTP server") ErrInvalidEmail = errors.New("invalid email address") ErrSendFailed = errors.New("failed to send email") )
Functions ¶
func FormatDuration ¶
FormatDuration converts a time.Duration to a human-readable string Examples: "30 minutes", "1 hour", "2 days"
func ValidateEmail ¶
ValidateEmail checks if an email address is valid
func ValidateMagicLinkTemplate ¶
ValidateMagicLinkTemplate validates that a template contains all required variables
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the mailer client
type Config ¶
type Config struct {
// SMTP Configuration
SMTPHost string // SMTP server hostname
SMTPPort int // SMTP server port (typically 587)
SMTPUsername string // SMTP authentication username
SMTPPassword string // SMTP authentication password
// Sender Information
FromEmail string // Sender email address
FromName string // Sender display name
// Application Information
AppName string // Application name for templates
// Template Configuration
MagicLinkTemplatePath string // Path to magic link HTML template file
}
Config holds the configuration for the mailer client
Click to show internal directories.
Click to hide internal directories.