Check out example codes for "how to configure email alerts in grafana container". It will help you in understanding the concepts better.

Code Example 1

docker run \
  -d \
  -p 3000:3000 \
  --name grafana \
  -e "GF_SMTP_ENABLED=true" \
  -e "GF_SMTP_HOST=smtp.example.com" \
  -e "GF_SMTP_USER=myuser" \
  -e "GF_SMTP_PASSWORD=mysecret" \
  grafana/grafana:5.1.0

Learn ReactJs, React Native from akashmittal.com