mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 15:10:43 +02:00
Make gmail auth work
This commit is contained in:
1 parent
db6b71ad03
commit
4744996f9a
8 files changed
+52
-35
No files matched your search
@@ -72,16 +72,14 @@ func Send(msg *Message) (int, error) {
|
||||
// get message body
|
||||
content := msg.Content()
|
||||
|
||||
auth := smtp.PlainAuth("", base.MailService.User, base.MailService.Passwd, host[0])
|
||||
|
||||
if len(msg.To) == 0 {
|
||||
return 0, fmt.Errorf("empty receive emails")
|
||||
}
|
||||
|
||||
if len(msg.Body) == 0 {
|
||||
} else if len(msg.Body) == 0 {
|
||||
return 0, fmt.Errorf("empty email body")
|
||||
}
|
||||
|
||||
auth := smtp.PlainAuth("", base.MailService.User, base.MailService.Passwd, host[0])
|
||||
|
||||
if msg.Massive {
|
||||
// send mail to multiple emails one by one
|
||||
num := 0
|
||||
|
||||
Reference in new issue
Block a user