Versions in this module Expand all Collapse all v0 v0.3.0 Aug 6, 2023 Changes in this version type Service + func NewSmtpService(cfg *config.SmtpServiceConfig, opts ...ServiceOption) (Service, error) + func NewSmtpServiceWithClient(client SmtpClient, opts ...ServiceOption) Service + type SmtpClient interface + SendEmail func(email *mail.Email) error v0.2.0 Aug 3, 2023 Changes in this version + type SendOptions struct + From string + Message *Message + ReplyTo []string + To string v0.1.0 Jul 29, 2023 Changes in this version + type AwsSesClient interface + SendEmail func(input *ses.SendEmailInput) (*ses.SendEmailOutput, error) + type DataReader struct + func NewDataReader(dir string, defaultFileName string, dataFileName string) (*DataReader, error) + func (r *DataReader) Close() error + func (r *DataReader) Read() (map[string]string, error) + type Message struct + HtmlBody string + Subject string + TextBody string + type Service interface + Send func(from string, to string, m *Message) error + func ApplyOptions(upstream Service, opts ...ServiceOption) Service + func NewAwsSesService(cfg *config.AwsSesServiceConfig, opts ...ServiceOption) (Service, error) + func NewAwsSesServiceWithClient(client AwsSesClient, opts ...ServiceOption) Service + func NewPrintService(w io.Writer, opts ...ServiceOption) Service + type ServiceOption func(upstream Service) Service + func WithRateLimit(frequency int) ServiceOption + func WithRetries(retryCount int) ServiceOption + type Template struct + func NewTemplate(dir string, minifyHtml bool) (*Template, error) + func (t *Template) Render(data any) (*Message, error)