alert

package
v0.0.0-...-1489327 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2022 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlertEMail

func AlertEMail(wg *sync.WaitGroup, mysql *xorm.Engine, alert_id int, retries int, sendto string, subject string, created int)

func AlertSMS

func AlertSMS(wg *sync.WaitGroup, mysql *xorm.Engine, alert_id int, retries int, sendto string, subject string, created int)

func AlertWeChat

func AlertWeChat(wg *sync.WaitGroup, mysql *xorm.Engine, alert_id int, retries int, subject string, created int)

func Dial

func Dial(addr string) (*smtp.Client, error)

return a smtp client

func GetMailContent

func GetMailContent(mysql *xorm.Engine, alert_id int) string

func GetSMTPHost

func GetSMTPHost(mysql *xorm.Engine) string

func GetSMTPPassword

func GetSMTPPassword(mysql *xorm.Engine) string

func GetSMTPPort

func GetSMTPPort(mysql *xorm.Engine) string

func GetSMTPUser

func GetSMTPUser(mysql *xorm.Engine) string

func GetSendFrom

func GetSendFrom(mysql *xorm.Engine) string

func GetSendMailGlobal

func GetSendMailGlobal(mysql *xorm.Engine) string

func SendMailUsingTLS

func SendMailUsingTLS(addr string, auth smtp.Auth, from string, to []string, msg []byte) (err error)

参考net/smtp的func SendMail() 使用net.Dial连接tls(ssl)端口时,smtp.NewClient()会卡住且不提示err len(to)>1时,to[1]开始提示是密送

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL