SMTP not configured, check your grafana.ini config file’s [smtp] section

Greetings!!
I am using grafana for sending email alerts and getting above mentioned error while testing contact points, below attached is custom.ini file, how can i setup these configs for my system, what are the changes i need to be done, can anyone describe more about these configs .

Could you use formatted text instead of images, please?

1 Like

This is the part of custom.ini file and the error says check your grafana.ini file which doesn’t exist in the grafana zip file

#################################### SMTP / Emailing ##########################
[smtp]
enabled = true
host = smtp.gmail.com:587
user = EmailId

If the password contains # or ; you have to wrap it with triple quotes. Ex “”“#password;”“”

password = “”“EmailPassword”“”
;cert_file =
;key_file =
skip_verify = true
from_address = EmailId
from_name = Grafana

EHLO identity in SMTP dialog (defaults to instance_name)

;ehlo_identity = dashboard.example.com

SMTP startTLS policy (defaults to ‘OpportunisticStartTLS’)

;startTLS_policy = NoStartTLS

Enable trace propagation in e-mail headers, using the ‘traceparent’, ‘tracestate’ and (optionally) ‘baggage’ fields (defaults to false)

;enable_tracing = false

[smtp.static_headers]

Include custom static headers in all outgoing emails

;Foo-Header = bar
;Foo = bar

[emails]
;welcome_email_on_sign_up = false
;templates_pattern = emails/.html, emails/.txt
;content_types = text/html

Formatted text, not just text, please. Post code or preformatted text - users - Discourse Meta

is it okay now?

#################################### SMTP / Emailing ##########################
[smtp]
enabled = true
host = smtp.gmail.com:587
user = EmailId

If the password contains # or ; you have to wrap it with triple quotes. Ex “”“#password;”“”
password = “”“EmailPassword”“”
;cert_file =
;key_file =
skip_verify = true
from_address = EmailId
from_name = Grafana

EHLO identity in SMTP dialog (defaults to instance_name)
;ehlo_identity = dashboard.example.com

SMTP startTLS policy (defaults to ‘OpportunisticStartTLS’)
;startTLS_policy = NoStartTLS

Enable trace propagation in e-mail headers, using the ‘traceparent’, ‘tracestate’ and (optionally) ‘baggage’ fields (defaults to false)
;enable_tracing = false

[smtp.static_headers]

Include custom static headers in all outgoing emails
;Foo-Header = bar
;Foo = bar

[emails]
;welcome_email_on_sign_up = false
;templates_pattern = emails/.html, emails/.txt
;content_types = text/html

1 Like

I just read that twice… Is your file name custom.ini? If you did not modify any grafana.ini file at all, how is grafana supposed to know your SMTP parameters?

yes, this is one of my question as While testing email alerts using contact points it says “SMTP not configured, check your grafana.ini config file’s [smtp] section” , although no such grafana.ini file exist in my downloaded zip file.
Discovered that adjustments could also be made in the custom.ini configuration file but it didn’t worked

Performed the entire process of setup once again. and now facing the issue given below

“Failed to send test alert.: failed to send notification to email addresses: rakshappperfect@gmail.com: 535 5.7.8 Authentication failed.”

Hello @rakshappperfect,

If you didn’t managed to solve your new issue, I recommend you to create a new one.
Was the solution of your initial problem reinstalling your instance?

Regards

Actually the previous issue was in the downloaded zip, now i downloaded right version and right edition, and the modifications we are doing in deafults.ini file are reflecting on server.

Sounds good! Can you share a link for this ZIP file? Then maybe a member of the team can take a look at it…

Grafana zip OSS edition

1 Like

hey @codi639 , the smtp issue got resolved, the issue was something related to username and password. Thanks

One other thing i want to ask that till now i am sending alerts on a static mail provided by us in Contact points, but now i have to send alerts on those emails which are linked to the particular org.
Our alert rule was something like if we change spend of a particular org, then after hitting a threshold it must fire an alert to mail linked to that org.
DB used: postgres

Any suggestions?