mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix: better error handling / messsage when testing email notification when stmp is not configured, fixes #8093
This commit is contained in:
@@ -107,7 +107,7 @@ func createDialer() (*gomail.Dialer, error) {
|
||||
|
||||
func buildEmailMessage(cmd *m.SendEmailCommand) (*Message, error) {
|
||||
if !setting.Smtp.Enabled {
|
||||
return nil, errors.New("Grafana mailing/smtp options not configured, contact your Grafana admin")
|
||||
return nil, m.ErrSmtpNotEnabled
|
||||
}
|
||||
|
||||
var buffer bytes.Buffer
|
||||
|
||||
Reference in New Issue
Block a user