Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidConfig = errors.New("maily: required parameter not set in Context")
ErrInvalidConfig is reported when a required parameter was not set in the Context.
View Source
var ErrTemplateMissing = errors.New("maily: couldn't find requested template")
ErrTemplateMissing is reported when the requested template could not be found.
View Source
var ErrTemplateMissingFile = errors.New("maily: requested template is missing files")
ErrTemplateMissingFile is reported when the requested template was missing a required file.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// The email address to send from
FromAddress string
// The from name, for example: "John Smith <jsmith@example.com>"
FromDisplay string
// The domain emails are being sent from (used to generate a Message-ID)
SendDomain string
// SMTP credentials, used to send the email
SMTPHost string
SMTPPort int
SMTPUsername string
SMTPPassword string
// The path to the template folder. Can be relative or absolute.
TemplatePath string
}
A Context contains information on how Maily should send emails. It is goroutine-safe. (that is, it may be accessed from multiple goroutines at the same time)
type EmailResult ¶
type EmailResult struct {
// The value of the Message-ID header.
MessageID string `json:"messageID"`
}
An EmailResult struct contains information about an email that was sent successfully.
type FuncMap ¶
type FuncMap map[string]interface{}
A FuncMap is a list of functions that can be used within a template.
type TemplateData ¶
type TemplateData map[string]interface{}
A TemplateData map holds information used in a template.
Click to show internal directories.
Click to hide internal directories.