diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-05-16 10:31:54 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-05-16 10:31:54 +0800 |
commit | 57ad8d50b74672924a44ab314071f1fdfcf042f3 (patch) | |
tree | 629a18a8c7e4bd8b0ff8a10b0368e5593e684967 /modules | |
parent | f6c94c29d5facfcd31966510336eb14b79819f50 (diff) | |
parent | 4744996f9a68ef0de8bc87b3c22c0bde9a305847 (diff) | |
download | gitea-57ad8d50b74672924a44ab314071f1fdfcf042f3.tar.gz gitea-57ad8d50b74672924a44ab314071f1fdfcf042f3.zip |
Merge branch 'dev' of github.com:gogits/gogs into dev
Diffstat (limited to 'modules')
-rw-r--r-- | modules/mailer/mailer.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/mailer/mailer.go b/modules/mailer/mailer.go index 63861d870e..a293beb15b 100644 --- a/modules/mailer/mailer.go +++ b/modules/mailer/mailer.go @@ -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 |