Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialServer ¶
DialServer dials a SMTP server using provided arguments. The 'server' argument should also contain a port number (e.g. 'localhost:25'). Anything other than port 25 is considered to be a connection with authentication over TLS.
func SendNotification ¶
func SendNotification(conf *NotificationConf, subject string, msgParagraphs ...string) error
SendNotification sends a general e-mail notification based on a respective monitoring configuration. The 'alarmToken' argument can be nil - in such case the 'turn of the alarm' text won't be part of the message.
Types ¶
type NotificationConf ¶
type NotificationConf struct { Sender string `json:"sender"` Receivers []string `json:"receivers"` SMTPServer string `json:"smtpServer"` SMTPUsername string `json:"smtpUsername"` SMTPPassword string `json:"smtpPassword"` // Signature defines multi-language signature for notification e-mails Signature map[string]string `json:"signature"` }
Click to show internal directories.
Click to hide internal directories.