Alert Error: SMTP not configured

Hi all,

Could anyone help me regarding this issue. Email Alert is not working at all. I did not find grafana.ini file in confg folder. Instead I found defaults.ini, and sample. This configuration is in defaults.ini file and sample.ini file.

One more question: How should I fill host, user, and from-address fields?

Regards

Hi @moom,

That’s expected — Grafana only ships defaults.ini and sample.ini; it doesn’t create grafana.ini for you. defaults.ini shouldn’t be touched directly since your changes would be lost on the next upgrade.

What to do:

  1. Copy sample.ini to grafana.ini in the same conf/ directory (or just create a new grafana.ini file there).
  2. Add an [smtp] section like this:

ini

[smtp]
enabled = true
host = smtp.gmail.com:587
user = your_email@gmail.com
password = your_app_password
from_address = your_email@gmail.com
from_name = Grafana
skip_verify = false
  1. Restart the Grafana service so it picks up the new config.

Filling in the fields:

  • host — your SMTP server address and port, e.g. smtp.gmail.com:587 (Gmail), smtp.office365.com:587 (Outlook), or your own mail server’s host:port.
  • user — the account username used to authenticate with that SMTP server (usually your full email address).
  • from_address — the email address alerts will appear to come from. It often needs to match user, or at least be authorized to send from that SMTP server, or your provider may reject/flag the mail.

Thanks @midhun5994 for sharing.

Actually, the problem still exists.

Can anyone suggest another way to solve this problem?

If you’re using Gmail, make sure the password is a Google App Password, not your regular Gmail password. Gmail no longer supports basic authentication with your account password.

To identify the exact cause, send a test email and check the Grafana log immediately afterward. The SMTP error there (authentication failure, TLS error, connection refused, etc.) will show why the email isn’t being sent.

Linux:

tail -f /var/log/grafana/grafana.log

Docker:

docker logs <container> --tail 100

Windows: Check the Grafana console output or the log file under the Grafana installation’s data\log directory (if file logging is enabled).

Please paste the SMTP error from the log.

Thanks @infofcc3

The log script is here:

level=error component=alertmanager orgID=1 component=dispatcher pipeline_time=2026-07-21T08:33:30.1513964+03:00 msg=“Notify for alerts failed” num_alerts=1 err=“slack/email[0]: notify retry canceled due to unrecoverable error after 1 attempts: SMTP not configured, check your grafana.ini config file’s [smtp] section” aggrGroup=“{}/{_grafana_autogenerated_=\“true\”}/{_grafana_receiver_=\“slack\”}:{alertname=\“HIGH Value Recorded\”, grafana_folder=\“ALERT\”}” alerts=“[HIGH Value Recorded[efa91fc][active]]”

That log line is the key:

SMTP not configured

This means Grafana isn’t loading any [smtp] configuration, so this isn’t an SMTP authentication problem.

Check based on your setup →

Linux: Verify Grafana is using the configuration file you edited. If it’s running as a systemd service, check the service definition or startup arguments to see which config file is being loaded.

Docker: Check whether any GF_SMTP_* environment variables are set, as they override the corresponding settings in grafana.ini.

Windows: Confirm the Grafana service is using the same configuration file you edited, then restart the service after making changes.

If you have Grafana server admin access, go to Server Admin → Settings and search for smtp. If it doesn’t show your SMTP settings, Grafana isn’t picking up the SMTP configuration you expected.

Please also paste your [smtp] section (redacting the password) to check for any configuration issues.