Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeNone = "" TypeSMTP = "smtp" )
service provider types
View Source
const ( AuthTypePlain = "plain" AuthTypeCRAMMD5 = "crammd5" )
authentication options
View Source
const (
PluginEmail = "email"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface { Name() string Start() error Close() error Post(variables map[string]interface{}) error State() *types.State Send(from string, to []string, subject, body string) error }
Client for email service
type Config ¶
type Config struct { Type string Host string Port int AuthType string Username string Password string `json:"-" yaml:"-"` FromEmail string ToEmails string // comma separated Insecure bool }
Config of email service
type SmtpClient ¶
type SmtpClient struct {
// contains filtered or unexported fields
}
smtp client
func (*SmtpClient) Name ¶
func (sc *SmtpClient) Name() string
func (*SmtpClient) Post ¶
func (sc *SmtpClient) Post(parameters map[string]interface{}) error
Post performs send operation
func (*SmtpClient) Send ¶
func (sc *SmtpClient) Send(from string, to []string, subject, body string) error
Send func implementation
func (*SmtpClient) Start ¶
func (sc *SmtpClient) Start() error
func (*SmtpClient) State ¶
func (sc *SmtpClient) State() *types.State
Click to show internal directories.
Click to hide internal directories.