Documentation
¶
Index ¶
- type FromAddressFunc
- type Mail
- type MailInstance
- type MailOpt
- func Bcc(to ...string) MailOpt
- func From(from mail.Address) MailOpt
- func HtmlBody(body string) MailOpt
- func HtmlBodyTemplate(tmpl *template.Template, data any) MailOpt
- func ReplyTo(to string) MailOpt
- func Subject(subject string) MailOpt
- func TextBody(body string) MailOpt
- func To(to ...string) MailOpt
- type Mailer
- type MailerAdapter
- type MailerConfig
- type Noop
- func (n *Noop) Bcc([]string) error
- func (n *Noop) From(string) error
- func (n *Noop) HtmlBody(string) error
- func (n *Noop) NewMail(context.Context) (MailInstance, error)
- func (n *Noop) ReplyTo(string) error
- func (n *Noop) Send(context.Context) error
- func (n *Noop) Subject(string) error
- func (n *Noop) TextBody(string) error
- func (n *Noop) To([]string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FromAddressFunc ¶
func MailOverrideFromAddress ¶
func MailOverrideFromAddress() FromAddressFunc
func StaticFromAddress ¶
func StaticFromAddress(address string) FromAddressFunc
type Mail ¶
type MailInstance ¶
type Mailer ¶
type Mailer struct {
MailerAdapter
Config *MailerConfig
}
type MailerAdapter ¶
type MailerAdapter interface {
NewMail(context.Context) (MailInstance, error)
}
type MailerConfig ¶
type MailerConfig struct {
FromAddressSrc []FromAddressFunc
}
func (*MailerConfig) GetActualFromAddress ¶
func (mc *MailerConfig) GetActualFromAddress(ctx context.Context, mail Mail) string
Click to show internal directories.
Click to hide internal directories.