Documentation
¶
Index ¶
- type Credentials
- type Message
- func NewMessage(credentials *Credentials, sender, body, subject string, recipients []string) *Message
- func NewMessageFromRequest(credentials *Credentials, r *http.Request) (*Message, error)
- func NewMessageFromTemplate(credentials *Credentials, tpl, subject string, tplVars interface{}, ...) (*Message, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type Credentials struct {
User string
Password string
PermChecker *models.PermissionChecker
}
Credentials defines the information needed to connect to a mail account
type Message ¶
type Message struct {
Recipients []string `json:"recipients"`
Subject string `json:"subject"`
Body string `json:"body"`
// contains filtered or unexported fields
}
Message defines the information needed to send a message
func NewMessage ¶
func NewMessage(credentials *Credentials, sender, body, subject string, recipients []string) *Message
NewMessage creates a new mail message from the given information
func NewMessageFromRequest ¶
func NewMessageFromRequest(credentials *Credentials, r *http.Request) (*Message, error)
NewMessageFromRequest builds and returns a new message from the given credentials and http.Request. Consumes the given requests's body.
func NewMessageFromTemplate ¶
func NewMessageFromTemplate(credentials *Credentials, tpl, subject string, tplVars interface{}, recipients []string) (*Message, error)
NewMessageFromTemplate creates a new
Click to show internal directories.
Click to hide internal directories.