1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 18:58:38 +00:00

Merge branch 'dev' of github.com:gogits/gogs into dev

This commit is contained in:
Lunny Xiao
2014-05-16 10:31:54 +08:00
10 changed files with 95 additions and 39 deletions

View File

@@ -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