Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Log = logs.NewLogger(10000)
Functions ¶
Types ¶
type CySmtpWriter ¶
type CySmtpWriter struct { Username string `json:"Username"` Password string `json:"password"` Host string `json:"Host"` Subject string `json:"subject"` FromAddress string `json:"fromAddress"` RecipientAddresses []string `json:"sendTos"` Level int `json:"level"` Body string // contains filtered or unexported fields }
CySmtpWriter implements LoggerInterface and is used to send emails via given SMTP-server.
func (*CySmtpWriter) GetSmtpAuth ¶
func (s *CySmtpWriter) GetSmtpAuth(host string) smtp.Auth
func (*CySmtpWriter) Init ¶
func (s *CySmtpWriter) Init(jsonconfig string) error
init smtp writer with json config. config like:
{ "Username":"example@gmail.com", "password:"password", "host":"smtp.gmail.com:465", "subject":"email title", "fromAddress":"from@example.com", "sendTos":["email1","email2"], "level":LevelError }
Click to show internal directories.
Click to hide internal directories.