Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EmailSendOutcome ¶
type EmailSendOutcome struct {
Error error
}
type EmailSendRequest ¶
type Header ¶
type Header struct { From string `yaml:"From"` //To string `yaml:"To"` Subject string `yaml:"Subject"` MIME string `yaml:"MIME"` Miscellaneous string `yaml:"Miscellaneous"` }
Header is the email header.
type MailConfig ¶
type MailConfig struct { Sender SenderConfig `yaml:"Sender"` Recipients map[string]Recipient `yaml:"Recipients"` Header Header `yaml:"Header"` TemplateText string `yaml:"TemplateText"` // contains filtered or unexported fields }
Config unites all following configs into a single type
func (*MailConfig) EmailerInstance ¶
func (m *MailConfig) EmailerInstance(ch <-chan EmailSendRequest)
type Recipient ¶
type Recipient struct { Name string `yaml:"Name"` Title string `yaml:"Title"` Address string `yaml:"Address"` Miscellaneous interface{} `yaml:"Miscellaneous"` }
Recipient is a person who receives an email. Parameters here are used in email template. the email is sent to `Address`
type SenderConfig ¶
type SenderConfig struct { Host string `yaml:"ServerHost"` Port int `yaml:"ServerPort"` Address string `yaml:"SenderAddress"` Name string `yaml:"SenderName"` Password string `yaml:"SenderPassword"` }
SenderConfig describes from who and which host we should send the emails
type ServerConfig ¶
type ServerConfig struct { Address string `yaml:"Address"` BaseURL string `yaml:"BaseURL"` EmailConfig MailConfig `yaml:"EmailConfig"` }
Click to show internal directories.
Click to hide internal directories.