Documentation ¶ Index ¶ type Email func New(cfg *EmailConfig) (*Email, error) func (e *Email) Send(to []string, subject, body string, opts ...Option) error type EmailConfig type Option func WithAttachments(files []string) Option func WithBCC(bcc []string) Option func WithCC(cc []string) Option func WithHTML() Option Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Email ¶ type Email struct { Dialer *gomail.Dialer Config *EmailConfig } func New ¶ func New(cfg *EmailConfig) (*Email, error) func (*Email) Send ¶ func (e *Email) Send(to []string, subject, body string, opts ...Option) error type EmailConfig ¶ type EmailConfig struct { Smtp string Port int Email string Password string FromName string } type Option ¶ type Option func(*emailOptions) func WithAttachments ¶ func WithAttachments(files []string) Option func WithBCC ¶ func WithBCC(bcc []string) Option func WithCC ¶ func WithCC(cc []string) Option func WithHTML ¶ func WithHTML() Option Source Files ¶ View all Source files email.go Click to show internal directories. Click to hide internal directories.