Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasMissingFields ¶
HasMissingFields returns true if any field in recipient data is empty.
Types ¶
type CLIArgs ¶
type CLIArgs struct {
EnvPath string // Path to an SMTP config JSON file
CSVPath string // Path to recipient CSV file
TemplatePath string // Path to HTML email template
Subject string // Subject line (supports templating with {{ .name }})
DryRun bool // If true, render but do not send emails
ShowPreview bool // If true, serve rendered HTML via localhost
PreviewPort int // Port to run the preview server on
Concurrency int // Number of parallel SMTP workers
RetryLimit int // Max retry attempts for failed sending
BatchSize int // Number of emails sent per SMTP batch
SheetURL string // Optional Google Sheet URL for CSV import
Filter string // Logical filter expression for recipients
Attachments []string // File paths to attach to every email
}
CLIArgs holds all configurable options passed via the command line. This struct is used throughout the Mailgrid CLI flow.
func ParseFlags ¶
func ParseFlags() CLIArgs
ParseFlags reads command-line flags using spf13/pflag and returns a filled CLIArgs struct.
Click to show internal directories.
Click to hide internal directories.