@@ -0,0 +1 @@
+Subproject commit 6a293f2d4b14b8e6d3f0539e383f6d0d30fce3fd
@@ -2,6 +2,9 @@ package mail
import (
"sync"
+ "time"
+
+ "qfw/util"
"github.com/go-gomail/gomail"
)
@@ -48,9 +51,12 @@ func GSendMail(from, to, cc, bcc, subject, body, fname, rename string, auth *Gma
func gSend(auth *GmailAuth, m *gomail.Message) bool {
mailLock.Lock()
defer mailLock.Unlock()
+ defer util.Catch()
for i := 0; i < 2; i++ {
if err := getDialer(i == 0, auth).DialAndSend(m); err == nil {
return true
+ } else {
+ time.Sleep(200 * time.Millisecond)
}
return false