fix bug in sending email

This commit is contained in:
Wenkai Yin 2017-03-03 18:10:28 +08:00
parent ac6c26d6db
commit 0a80d7fee2

View File

@ -37,11 +37,12 @@ type Mail struct {
Message string
}
var mc models.Email
var mc *models.Email
// SendMail sends Email according to the configurations
func (m Mail) SendMail() error {
mc, err := config.Email()
var err error
mc, err = config.Email()
if err != nil {
return err
}