Home Assistant SMTP notifications with Outlook or Gmail
Home Assistant’s SMTP integration lets automations email you – for example, when an alarm is triggered, a door is left open, or a camera spots someone. The integration signs in with a username and password, so it can’t connect to Microsoft 365 or Gmail, which require OAuth.
With Auth-Email, you only change the host, port, and password in the SMTP integration. Your automations stay the same.
Before you start: link the mailbox in your Auth-Email dashboard, and choose a password for it. That is the password you’ll enter in Home Assistant – not your mailbox password.
Step 1: Set up the SMTP integration
In recent versions of Home Assistant, the SMTP integration is set up in the user interface. (For older versions that use configuration.yaml, see YAML configuration below.)
- Go to
Settings > Devices & services, click Add integration, and choose SMTP (or, if it is already set up, choose Reconfigure) - Enter the following. Show the settings for an account provided by Outlook:
- Host:
outlook.auth-email.com - Port:
465 - Connection security:
SSL/TLS - Username: The linked mailbox’s full email address (e.g.,
you@outlook.com) - Password: The password you chose in Auth-Email
- Sender email: The linked mailbox’s email address, or an address that the mailbox is allowed to send as
- Sender name: The name that emails should show (e.g., “Home Assistant”)
- Verify SSL certificate: Ticked
- Host:
- Click Submit, and then Add recipient to add the address that should receive emails
YAML configuration
In older versions, add a notifier to configuration.yaml, and restart Home Assistant:
notify:
- name: email
platform: smtp
server: outlook.auth-email.com
port: 465
encryption: tls
username: you@yourdomain.com
password: !secret auth_email_password
sender: you@yourdomain.com
recipient: you@yourdomain.com
Use outlook.auth-email.com as the server, and add auth_email_password: your-auth-email-password to secrets.yaml. Here, encryption: tls means SSL/TLS, as Auth-Email expects on port 465.
Step 2: Send a test
Go to Developer tools > Actions, and choose SMTP: Send message (smtp.send_message), with the recipient you added as the target. (With YAML configuration, choose notify.email instead.) Enter a message, and click Perform action.
Troubleshooting
- “Login failed” or “535 Authentication failed”: check that the username is the full email address, and that the password is the one you chose in Auth-Email (not your mailbox password)
- Timeouts or TLS errors: check that Connection security is SSL/TLS (
encryption: tls) with port465 - “Sender address rejected” or “SendAsDenied”: the sender must be the linked mailbox, or an address that the mailbox is allowed to send as
For other errors, such as Microsoft 365 reporting that SMTP AUTH is disabled, see fixing common errors. Your account’s connection page in the Auth-Email dashboard also shows whether Home Assistant has connected, and explains any error it received. Still stuck? Email us – we’ll help you get it working.
Related articles
Try Auth-Email with Home Assistant
Link your mailbox, set up the SMTP integration, and send a test notification.
Start your free trial →No credit card needed. Check that it works, including sending yourself test messages, before you pay.