Add an SMTP notification integration

Send automation and security alerts through Microsoft 365. Add an SMTP notify configuration and reference it from automations that need email delivery.

Design useful automations

Reserve email for alarms that remain useful outside the Home Assistant app, such as water leaks, alarm triggers, prolonged outages, and failed backups. Add a cooldown or state condition so a flapping sensor cannot flood the mailbox.

Use secrets and stable service names

Keep the SMTP password in secrets.yaml and reference it from the SMTP notify configuration. Give the notifier a clear name so automations do not depend on a generic or changing service.

After reloading or restarting Home Assistant, call the notification action manually from Developer Tools before adding it to an automation. This separates YAML and transport errors from trigger conditions.

Before you save

Use the connected Microsoft 365 address as the sender. Store the generated password securely; it cannot be displayed again.

Send a small test message to an address you control. Confirm delivery before enabling production notifications.

If the test fails

Check that port 587 is permitted by the network, STARTTLS is enabled, and no spaces were copied into the credentials.

Never share passwords or message content. Revoke and recreate the connection if the password is lost.