Documentation
¶
Index ¶
- type Config
- type Mandrill
- func (m *Mandrill) AddAttachment(attachment *mandrill.Attachment) Mandrills
- func (m *Mandrill) AddRecipient(recipientEmail, recipientName string) Mandrills
- func (m *Mandrill) Send() error
- func (m *Mandrill) SetEmailFrom(emailFrom string) Mandrills
- func (m *Mandrill) SetFromName(fromName string) Mandrills
- func (m *Mandrill) SetGlobalMergeVars(data map[string]interface{}) Mandrills
- func (m *Mandrill) SetHTMLContent(subject, htmlContent string) Mandrills
- func (m *Mandrill) SetTemplate(templateName string, templateContent map[string]string) Mandrills
- func (m *Mandrill) SetTextContent(subject, textContent string) Mandrills
- type Mandrills
- type SMTP
- func (s *SMTP) AddRecipient(recipient ...string) *SMTP
- func (s *SMTP) Send() error
- func (s *SMTP) SetContent(subject, message string) *SMTP
- func (s *SMTP) SetHTMLTemplate(fs embed.FS, tplFile, subject string, args interface{}) *SMTP
- func (s *SMTP) SetHTMLTemplateFromPath(tplFile, subject string, args interface{}) *SMTP
- func (s *SMTP) SetSingleRecipient(recipient string) *SMTP
- type SMTPConfig
- type SMTPOptions
- type SMTPs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mandrill ¶
type Mandrill struct {
*Config
// contains filtered or unexported fields
}
func (*Mandrill) AddAttachment ¶
func (m *Mandrill) AddAttachment(attachment *mandrill.Attachment) Mandrills
func (*Mandrill) AddRecipient ¶
func (*Mandrill) SetEmailFrom ¶
func (*Mandrill) SetFromName ¶
func (*Mandrill) SetGlobalMergeVars ¶
func (*Mandrill) SetHTMLContent ¶
func (*Mandrill) SetTemplate ¶
func (*Mandrill) SetTextContent ¶
type Mandrills ¶
type Mandrills interface {
AddRecipient(recipientEmail, recipientName string) Mandrills
AddAttachment(attachment *mandrill.Attachment) Mandrills
SetHTMLContent(subject, htmlContent string) Mandrills
SetTextContent(subject, textContent string) Mandrills
SetGlobalMergeVars(data map[string]interface{}) Mandrills
SetTemplate(templateName string, templateContent map[string]string) Mandrills
SetEmailFrom(emailFrom string) Mandrills
SetFromName(fromName string) Mandrills
Send() error
}
func NewMandrill ¶
type SMTP ¶
type SMTP struct {
SMTPConfig
// contains filtered or unexported fields
}
func NewSMTP ¶
func NewSMTP(opts ...SMTPOptions) *SMTP
func (*SMTP) AddRecipient ¶
func (*SMTP) SetContent ¶
func (*SMTP) SetHTMLTemplate ¶
func (*SMTP) SetHTMLTemplateFromPath ¶ added in v2.35.0
func (*SMTP) SetSingleRecipient ¶
type SMTPConfig ¶
type SMTPConfig struct {
Config
// contains filtered or unexported fields
}
type SMTPOptions ¶ added in v2.5.0
type SMTPOptions func(*SMTPConfig)
func WithEmail ¶ added in v2.5.0
func WithEmail(email string) SMTPOptions
func WithEmailFrom ¶ added in v2.5.0
func WithEmailFrom(emailFrom string) SMTPOptions
func WithEmailPassword ¶ added in v2.5.0
func WithEmailPassword(password string) SMTPOptions
func WithHost ¶ added in v2.5.0
func WithHost(host string) SMTPOptions
func WithPort ¶ added in v2.5.0
func WithPort(port int) SMTPOptions
func WithSender ¶ added in v2.5.0
func WithSender(sender string) SMTPOptions
Click to show internal directories.
Click to hide internal directories.