Documentation ¶
Index ¶
- type MailBody
- func FromFile(filename string) *MailBody
- func FromReader(reader io.Reader) *MailBody
- func FromString(body string) *MailBody
- func TemplateFromFile(filename string, data *interface{}) *MailBody
- func TemplateFromReader(reader io.Reader, data interface{}) *MailBody
- func TemplateFromString(body string) *MailBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MailBody ¶
type MailBody struct { Headers textproto.MIMEHeader // contains filtered or unexported fields }
MailBody represents HTML text for use in an HTML email.
func FromReader ¶
FromReader will return a MailBody based upon the provided data.
func FromString ¶
FromString will return a MailBody based upon the text provided.
func TemplateFromFile ¶
TemplateFromFile will return a MailBody based upon the template at the given filename. A pointer to an interface{} is accepted so that this object can be updated with different data. This allows for generating multiple emails with different data from the same template.
func TemplateFromReader ¶
TemplateFromReader will return a MailBody based upon the template using the provided data.
func (*MailBody) GenerateBody ¶
GenerateBody will perform any parsing and return the message body.
Click to show internal directories.
Click to hide internal directories.