Compare commits

..

No commits in common. "main" and "v1.1.1" have entirely different histories.
main ... v1.1.1

2 changed files with 2 additions and 10 deletions

View File

@ -69,8 +69,6 @@ func New(cfg Config) *EmailPlainAuthSender {
to string
name string
body string
retry int
}
var whiteListRegs = []*regexp.Regexp{}
@ -100,7 +98,7 @@ func New(cfg Config) *EmailPlainAuthSender {
var emailQueue = make(chan emailItem, 1024)
var emailSendFunc = func(to string, name, body string) (err error) {
eml := emailItem{to, name, body, 0}
eml := emailItem{to, name, body}
emailQueue <- eml
return nil
}
@ -141,13 +139,6 @@ func New(cfg Config) *EmailPlainAuthSender {
log.Infof("to[%v],from[%s]", m.To, m.From)
log.Infof("smtpUser[%s],smtpPass[%s],smtpAddr[%s:%s],smtpProxy[%s]",
smtpUser, secLogPass(smtpPass), smtpAddr, smtpPort, secLogProxy(cfg.SmtpProxy))
if eml.retry < 5 {
go func() {
eml.retry++
time.Sleep(time.Duration(5*eml.retry) * time.Second)
emailQueue <- eml
}()
}
continue
}
log.Infof("success send email to [%s]", eml.to)

View File

@ -95,6 +95,7 @@ func DialWithProxy(addr string, proxyAddr string) (*Client, error) {
if err != nil {
return nil, fmt.Errorf("proxy.SOCKS5 error: %w", err)
}
fmt.Println("dialer=================", dialer)
conn, err := dialer.Dial("tcp", addr)
if err != nil {