home-assistant.io/source/components/notify.smtp.markdown
Ryan Kraus 0b4c6b188b Updated notifier documentation.
1) Added missing notifiers to general notifier page and rearranged
notifiers to be in alphabetical order.
2) Added documentation about new name property for notifiers and how it
works into the service call.
2015-08-19 23:54:10 -04:00

1.8 KiB

layout, title, description, date, sidebar, comments, sharing, footer
layout title description date sidebar comments sharing footer
page SMTP notification support Instructions how to add e-mail notifications to Home Assistant. 2015-06-03 18:00 false false true true
The smtp platform allows you to deliver notifications from Home Assistant to an e-mail recipient.

To enable notification by e-mail in your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
notify:
  name: NOTIFIER_NAME
  platform: mail
  server: MAIL_SERVER
  port: YOUR_SMTP_PORT
  sender: SENDER_EMAIL_ADDRESS
  starttls: 1 or 0
  username: YOUR_SMTP_USERNAME
  password: YOUR_SMTP_PASSWORD
  recipient: YOUR_RECIPIENT

Setting the optional parameter name allows multiple notifiers to be created. The default value is notify. The notifier will bind to the service notify.NOTIFIER_NAME.

This platform is fragile and not able to catch all exceptions in a smart way because of the large number of possible configuration combinations.

A combination that will work properly is port 587 and STARTTLS. It's recommanded to enable STARTTLS, if possible.

Keep in mind that if the password contains a colon, it needs to be wrapped in apostrophes in the configuration.yaml file.

For Google Mail (smtp.gmail.com) an additional step in the setup process is needed. Google has some extra layers of protection which need special attention. By default, the usage by external applications, especially scripts, is limited. Visit the Less secure apps page and enable it.

To use notifications, please see the getting started with automation page.