Updated 2026-11-20

How to Send Home Assistant Email Notifications Through SMTP

In Home Assistant 2026.7 or newer, go to Settings > Devices & services > Add integration, pick SMTP and enter Host smtp.bulko.io, Port 587, Connection security STARTTLS plus your Bulko SMTP username and password, then add a recipient. Home Assistant creates a notify entity for each recipient that you call with notify.send_message or smtp.send_message.

Home Assistant sends email through its built-in SMTP integration: door and leak alerts, "motion detected" messages with a camera snapshot, low-battery reminders, daily energy summaries. It has no mail server of its own, so every message goes through the SMTP server you configure.

Most people start with Gmail, and that is where the trouble begins: the SMTP integration has no OAuth 2.0 support, so Gmail needs an app password, which only exists with 2-Step Verification, is unavailable under Advanced Protection and is often disabled on Google Workspace accounts. When the password is revoked or the account security changes, alerts stop silently. A dedicated relay gives Home Assistant its own credentials that are not tied to your personal mailbox.

Note the big change in 2026: since 2026.7 SMTP is set up in the UI (config flow) instead of configuration.yaml, and since 2026.8 each recipient is a notify entity with a new smtp.send_message action that can attach camera snapshots. Older forum answers with notify: - platform: smtp describe the legacy setup.

Hostsmtp.bulko.io
Port587 · 465 · 2525
EncryptionSTARTTLS · SSL
Loginfrom dashboard

Home Assistant SMTP settings

FieldValue
Sender email[email protected] (an address on a domain you control)
Sender nameHome Assistant (optional display name)
Hostsmtp.bulko.io
Port587 (or 2525; 465 with SSL/TLS)
Connection securitySTARTTLS (SSL/TLS only with port 465)
UsernameYour Bulko SMTP username (smtp_xxxxxxxxxxxxxxxx)
PasswordYour Bulko SMTP password
Verify SSL certificateOn (public Let's Encrypt certificate)
Additional options: Connection timeoutDefault 60 seconds is fine
Recipient: Name / Emaile.g. My email / [email protected] (add more with Add recipient)

Upgrading from configuration.yaml and secrets.yaml

Before 2026.7 the only way to configure SMTP was a notify platform in configuration.yaml, usually with the password in secrets.yaml:

notify:
  - name: "email_alerts"
    platform: smtp
    server: "smtp.bulko.io"
    port: 587
    encryption: starttls        # starttls, tls or none
    timeout: 15
    sender: "[email protected]"
    sender_name: "Home Assistant"
    username: "smtp_xxxxxxxxxxxxxxxx"
    password: !secret bulko_smtp_password
    recipient:
      - "[email protected]"
      - "[email protected]"
    verify_ssl: true

# secrets.yaml
bulko_smtp_password: "YOUR_BULKO_SMTP_PASSWORD"

On 2026.7 and newer this block is imported into a UI entry automatically on restart and a repair notice asks you to remove it; YAML support is scheduled to stop working in 2027.1. If the import fails, the repair Failed to import SMTP YAML configuration shows the block it could not read.

  • After import the password lives in the config entry (.storage/core.config_entries), not in secrets.yaml. To change it later, use Reconfigure on the SMTP integration.
  • That file is included in Home Assistant backups, so keep backups encrypted and do not share them in forum posts.
  • Old automations calling notify.email_alerts keep working until 2027.3, but raise the repair Detected use of deprecated action. Switch them to notify.send_message or smtp.send_message with a recipient entity as target.

Step-by-step setup

  1. Buy an SMTP package on the Bulko SMTP Relay page and copy the username and password from Dashboard -> SMTP Access.
  2. Make sure Home Assistant is on 2026.7 or newer (Settings > About). On older versions use the YAML method described below.
  3. Go to Settings > Devices & services, select Add integration and search for SMTP.
  4. Fill in Sender email, Sender name, Host smtp.bulko.io, Port 587, Connection security STARTTLS, Username and Password. Leave Verify SSL certificate on.
  5. Optionally expand Additional options to set Connection timeout, Reply-To email address and Reply-To name. Select Submit: Home Assistant connects and logs in right away, so wrong credentials or a wrong port are reported in the dialog.
  6. In the Recipient step that follows, enter a Name and the Email address that should receive alerts, then Submit.
  7. To add more people, open the SMTP integration and select Add recipient. Each recipient becomes its own notify entity (for example notify.my_email), which you pick as the target in automations.

Automation: email a camera snapshot with smtp.send_message

# automations.yaml (or paste in the automation editor via "Edit in YAML")
alias: "Email doorbell snapshot"
mode: single                 # ignore new triggers while this run is active
triggers:
  - trigger: state
    entity_id: binary_sensor.front_door_motion
    to: "on"
actions:
  - action: smtp.send_message
    target:
      entity_id: notify.my_email          # your SMTP recipient entity
    data:
      title: "Motion at the front door"
      message: "Motion detected at {{ now().strftime('%H:%M:%S') }}."
      html: |
        <p>Motion detected at the front door.</p>
        <img src="cid:door_snapshot" alt="Front door snapshot">
      attachments:
        - media_source:
            media_content_id: media-source://camera/camera.front_door
            media_content_type: image/jpeg
          filename: door_snapshot.jpg
          content_id: door_snapshot
  - delay: "00:05:00"        # at most one email per 5 minutes

Camera snapshots, HTML email and sending volume

There are two actions for the recipient entities:

ActionUse it for
notify.send_messagePlain text: title (subject) and message. Works in any notify blueprint.
smtp.send_messageAdds html, attachments and priority (lowest to highest). Available since 2026.8.

An attachment is a media source: a camera (a fresh snapshot is taken when the email is sent), an image entity, a TTS file or a file from local media. Camera, image and TTS sources need a filename. To show the picture inside the HTML body, give it a content_id and reference it as <img src="cid:door_snapshot">. The legacy YAML notifier used data: images: with file paths instead, and those folders had to be listed in allowlist_external_dirs.

Watch the volume: a motion sensor that flaps can send hundreds of messages an hour. Bulko allows 2,000 emails per day per SMTP access and 32 MB per message, so set mode: single with a short delay (see the example) or a condition on the last trigger time.

Send a test email

Open Settings > Tools > Actions (called Developer tools > Actions in older releases), search for Notifications: Send a notification message (notify.send_message), pick your SMTP recipient entity as the target, type a message and select Perform action. To test attachments, use SMTP: Send message instead and add a camera under Attachments.

Success means no error toast and the email in the recipient's inbox, with your Sender name and address. A failure shows Failed to authenticate with SMTP server. Please verify your credentials. or Failed to send email message due to a connection error. right in the UI. If the integration itself shows Failed to set up or asks to Re-authenticate SMTP, the login failed on startup.

Troubleshooting

ProblemFix
"Invalid authentication" in the setup dialog, or 535 Authentication failedThe username is your Bulko SMTP username (smtp_...), not your email address. Paste the login and password again from Dashboard -> SMTP Access; for an existing entry use Reconfigure or the Re-authenticate SMTP prompt. More: https://bulko.io/en/smtp-errors/535/.
"Failed to connect" or "Timeout establishing connection"Connection security and port do not match, or the port is blocked. Use STARTTLS with 587 or 2525 and SSL/TLS only with 465; if 587 times out, try 2525.
Log shows "SMTP server not found or refused connection" or "Login not possible. Please check your setting and/or your credentials"These come from the legacy YAML notifier (before 2026.7). Check server, port and encryption in configuration.yaml, make sure the !secret name exists in secrets.yaml, or upgrade and let Home Assistant import it.
"Cannot attach media-source://camera/... you must explicitly specify a filename"Camera, image and TTS attachments need a filename such as snapshot.jpg in the attachment item.
Repair "Detected use of deprecated action notify.xxx"Your automations still call the old notifier. Replace it with notify.send_message or smtp.send_message and select the recipient entity under Target.
554 5.7.1 rejected, or alerts land in spamSend from an address on your own domain, not from gmail.com, and verify that domain in Bulko for DKIM. Rejections come from Bulko's content filter, so avoid odd links in the message.

Home Assistant OS vs Docker

  • Home Assistant OS / Supervised: the integration is configured in the UI, so no file editing is needed. For the legacy YAML or secrets.yaml, use the File editor or Studio Code Server add-on. Logs are under Settings > System > Logs.
  • Docker / Container: the container makes the outbound connection itself. Test from the host with docker exec -it homeassistant python3 -c "import smtplib; s=smtplib.SMTP('smtp.bulko.io',587,timeout=10); s.starttls(); print(s.noop())" (adjust the container name). A timeout here means a firewall, VPN container or ISP block, not a Home Assistant setting. configuration.yaml and secrets.yaml sit in the volume mounted at /config.
  • For details on failures enable debug logging on the SMTP integration (Enable debug logging on its page), reproduce the problem, then disable it to download the log.

FAQ

Is the Home Assistant SMTP integration still YAML-only?

No. Since 2026.7 it is set up in the UI under Settings > Devices & services. Existing YAML is imported automatically and is scheduled to stop working in 2027.1.

Can I keep the SMTP password in secrets.yaml?

Only for the legacy YAML notifier. A UI-configured entry stores the password in Home Assistant's own storage, which is why your backups should be encrypted.

How do I email a camera snapshot from Home Assistant?

Use the smtp.send_message action with an attachment whose media source is the camera, a filename and optionally a content_id to show it inline in the HTML message.

Why do people struggle with Gmail in Home Assistant?

The integration does not support OAuth 2.0, so Gmail requires an app password, which needs 2-Step Verification and is often blocked on Workspace accounts. A relay login avoids tying alerts to your personal account.

How much does it cost and is there a limit?

Bulko SMTP is a one-time package: $5 for 5,000 emails, $15 for 20,000, $30 for 50,000 or $60 for 150,000, with no expiry. Each SMTP access can send up to 2,000 emails per day.

Can Home Assistant read incoming email through Bulko?

No. Bulko is send-only, with no IMAP or mailbox. The IMAP integration in Home Assistant still needs a regular mailbox provider.

Get SMTP credentials for Home Assistant

One-time payment by card or crypto, no subscription. Unused emails never expire. 2,000 emails per day per SMTP account.

SMTP Relay 5K: $5 · 5000SMTP Relay 20K: $15 · 20000SMTP Relay 50K: $30 · 50000SMTP Relay 150K: $60 · 150000
See SMTP relay plans

What you can send: Acceptable Use Policy.