Gmail for notifications

Does anyone have Gmail set up for SMTP notifications? I’ve tried various combinations of grafana.ini settings but haven’t been able to make it work. Thanks.

smtp.gmail.com

port: 465

should work, if you use two factor auth generate a device specific password to use

I forgot about 2-factor auth. Thanks.

I use this settings and receive an error ;

[smtp]
enabled = true
host = smtp.gmail.com:465
user =paolo.kusanovic@gmail.com
password ="pass"
skip_verify = true
from_address = paolo.kusanovic@gmail.com
from_name = Sistema de monitoreo en lìnea

and receive this error :

Async sent email 0 succeed, not send emails: paolo.kusanovic_at_gmail.com err: gomail: could not send email 1: gomail: invalid address “=?UTF-8?q?Sistema_de_monitoreo_en_l=ECnea_<paolo.kusanovic_at_gmail.com>?=”: mail: expected single address, got “?=”

Can you publish your entire code ?

Thanks

Hello,

I managed to get gmail to work on my setup, so just thought it was worth Sharing my config.
First two factor authentication on my gmail account is off, as well as enabling allow less secure applications.

Then my config read the same as happynerds above, except the field below:

password = “”“pass”""

msg=“Failed to send alert notification email” logger=alerting.notifier.email error=“unencrypted connection”

why i find the same error in grafana 5.xx and 6.xxx?

Hi Team,

I am a new new user for Grafana. I am trying to do the Email SMTP configuration in grafana by sending a mail to particular recipient but i am unable to do the same.
When we are checked in log files it is showing as below error. Could you please help on this.

ERROR : msg=“Sending alert notification to” logger=alerting.notifier.email addresses=[abc.123@gmail.com
t=2019-04-23T16:21:11+0530 lvl=eror msg=“Failed to send alert notification email” logger=alerting.notifier.email error=“SMTP not configured, check your grafana.ini config file’s [smtp] section.”
t=2019-04-23T16:21:11+0530 lvl=eror msg=“failed to send notification” logger=alerting.notifier uid= error=“SMTP not configured, check your grafana.ini config file’s [smtp] section.”

you must configure your SMTP server in the config.

i have did the same still it is not working

I had the exact same issue - It wasn’t clear to me that the semi-colon “;” preceeding each line actually comments out that line - This is especially confusing since the author of the grafana.ini file also uses the usual “#” symbol to add comments throughout the file…

To get this working with Gmail configured the following lines under [smtp] (removing the “;” at the start of each bolded line) and then it worked - Note that if you have Google Mail 2FA enabled you need to generate a new “App Password” in Google Mail and then enter that as PASSWORD, not your usual gmail password…

#################################### SMTP / Emailing ##########################
[smtp]
enabled = true
host = smtp.gmail.com:587
user = USER_NAME
password = “”“PASSWORD”""
;cert_file =
;key_file =
;skip_verify = false
from_address = admin@grafana.localhost
from_name = Grafana
;ehlo_identity = dashboard.example.com

[emails]
;welcome_email_on_sign_up = false

2 Likes