Documentation ¶
Index ¶
- func Send(server string, port int, username, password, emailTo, title, message string) error
- type LMail
- func (lm *LMail) AddCopyTo(cc ...string) *LMail
- func (lm *LMail) AddTo(to ...string) *LMail
- func (lm *LMail) Sender(sender string) *LMail
- func (lm *LMail) SetCopyTo(cc []string) *LMail
- func (lm *LMail) SetTo(to []string) *LMail
- func (lm *LMail) Struct(body interface{}) *MailStruct
- func (lm *LMail) Subject(subject string) *LMail
- func (lm *LMail) Template(body map[string]interface{}, template string) *MailTemplate
- func (lm *LMail) Text(body interface{}) *MailText
- type LSmtp
- type Liam
- type MailJson
- type MailStruct
- type MailTemplate
- type MailText
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LMail ¶
type LMail struct {
// contains filtered or unexported fields
}
func (*LMail) Struct ¶
func (lm *LMail) Struct(body interface{}) *MailStruct
func (*LMail) Template ¶
func (lm *LMail) Template(body map[string]interface{}, template string) *MailTemplate
var body = map[string]interface{}{"Username": "Dave", "Type": "a new client"}
var template = `Hello {{ .Username }}, your are {{ .Type }}.`
The name of a key of the data, which must be a map, preceded
by a period, such as .Key The result is the map element value indexed by the key. Key invocations may be chained and combined with fields to any depth: .Field1.Key1.Field2.Key2 Although the key must be an alphanumeric identifier, unlike with field names they do not need to start with an upper case letter. Keys can also be evaluated on variables, including chaining: $x.key1.key2
type MailStruct ¶
type MailStruct struct {
MailText
}
func (*MailStruct) AsJson ¶
func (ms *MailStruct) AsJson() *MailJson
func (*MailStruct) AsTemplate ¶
func (ms *MailStruct) AsTemplate(template string) *MailTemplate
type MailTemplate ¶
type MailTemplate struct {
// contains filtered or unexported fields
}
TODO: html template
func (*MailTemplate) Send ¶
func (mt *MailTemplate) Send() (err error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.