Versions in this module Expand all Collapse all v0 v0.1.0 Sep 3, 2015 Changes in this version + const FakeEmailerType + const MailgunEmailerType + var ErrorNoTemplate = errors.New("No HTML or Text template found for template name.") + func RegisterEmailerConfigType(emailerType string, fn NewEmailerConfigFunc) + type Emailer interface + SendMail func(from, subject, text, html string, to ...string) error + type EmailerConfig interface + Emailer func() (Emailer, error) + EmailerID func() string + EmailerType func() string + func NewEmailerConfigFromFile(loc string) (EmailerConfig, error) + func NewEmailerConfigFromType(emailerType string) (EmailerConfig, error) + type FakeEmailer struct + func (f FakeEmailer) SendMail(from, subject, text, html string, to ...string) error + type FakeEmailerConfig struct + ID string + func (cfg FakeEmailerConfig) Emailer() (Emailer, error) + func (cfg FakeEmailerConfig) EmailerID() string + func (cfg FakeEmailerConfig) EmailerType() string + type MailgunEmailerConfig struct + Domain string + ID string + PrivateAPIKey string + PublicAPIKey string + func (cfg *MailgunEmailerConfig) UnmarshalJSON(data []byte) error + func (cfg MailgunEmailerConfig) Emailer() (Emailer, error) + func (cfg MailgunEmailerConfig) EmailerID() string + func (cfg MailgunEmailerConfig) EmailerType() string + type NewEmailerConfigFunc func() EmailerConfig + type TemplatizedEmailer struct + func NewTemplatizedEmailerFromGlobs(textGlob, htmlGlob string, emailer Emailer) (*TemplatizedEmailer, error) + func NewTemplatizedEmailerFromTemplates(textTemplates *template.Template, htmlTemplates *htmltemplate.Template, ...) *TemplatizedEmailer + func (t *TemplatizedEmailer) SendMail(from, subject, tplName string, data map[string]interface{}, to string) error