Cannot send email out of an action

Hello,
I did a mistake to write my problem in german.
So I repeat my question now in english.
I did a automation with an aqara vibration sensor . The sensor works and fires. as an action I’ll be informed via mobil and with an email.
Via mobil it works. Via email it doesn’t work.

So here ist my Yaml:

Example Email configuration

notify:
platform: smtp
name: “oh104emailalarm”
server: “smtp.ionos.de
sender: “email of the sender”
sender_name: “type in any name ”
recipient: “email-adress of the receiver”
encryption: tls
port: 587
timeout: 15
username: “users email adress”
password: “password”
debug: true

in the automations.yaml I did the following code:

  • id: ‘1753614550647’
    alias: OH104 heat pump is moved
    description: ‘’
    triggers:
    • device_id: 6a0871d2ef61377e9da1837318795bf0
      domain: zha
      type: device_tilted
      subtype: device_tilted
      trigger: device
      conditions:
      actions:
    • action: notify.mobile_app_pixel_9_pro_xl
      metadata: {}
      data:
      message: heat pump was moved
    • action: notify.oh104emailalarm
      metadata: {}
      data: {}

I got an error message:
The Automation „OH104 heat pump was moved“ (automation.oh104_heat pump was moved) has an unkown action: notify.oh104emailalarm.

The first action works fine, the second action got the above error message.

Thanks for Your help!

First, check in the Actions tool to make sure that notify.oh104emailalarm shows up as an available action. If it doesn’t, restart Home Assistant, and check again.

If notify.oh104emailalarm is available as an action, make sure to include a message in your action (as suggested on your previous post). The message configuration variable is required.

And please format you pasted config correctly for the forum in future. Use the </> button in the post toolbar (under the cog icon on small displays). Or surround your post in three backticks as per: https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#oneone-format-it-properly-16

Now I get an other error:
OH104 Wärmepumpe wird bewegt: Error executing script. Service not found for call_service at pos 2: Action notify.oh104emailalarm not found

the actual stand of my configuration.yaml is:

#============================= Notification Email =============================
# Email configuration
notify:
  - name: "oh104emailalarm"
    platform: smtp
    server: "<smtp-server-name>"
    port: 587
    timeout: 30
    sender: "<senders.email>"
    encryption: tls
    verify_ssl: False
    username: <senders email>
    password: "<password>"
    recipient:
      - "<recipients-adress>"
    sender_name: "Wärmepumpe"

The automations.yaml looks so:

- id: '1753614550647'
  alias: OH104 Wärmepumpe wird bewegt
  description: ''
  triggers:
  - device_id: 6a0871d2ef61377e9da1837318795bf0
    domain: zha
    type: device_tilted
    subtype: device_tilted
    trigger: device
  conditions: []
  actions:
  - action: notify.mobile_app_pixel_9_pro_xl
    metadata: {}
    data:
      message: Wärmepumpe wird bewegt
  - action: notify.oh104emailalarm
    metadata: {}
    data:
      message: Wärmepumpe wird bewegt
  mode: single

The mobile notification works,
the email-notification does’nt work

The detailed error message looks so:

2025-08-17 15:26:31.166 ERROR (MainThread) [homeassistant.components.notify] Error setting up platform smtp
File “/usr/src/homeassistant/homeassistant/components/smtp/notify.py”, line 108, in get_service
File “/usr/src/homeassistant/homeassistant/components/smtp/notify.py”, line 172, in connection_is_valid
File “/usr/src/homeassistant/homeassistant/components/smtp/notify.py”, line 151, in connect
mail = smtplib.SMTP_SSL(
File “/usr/local/lib/python3.13/smtplib.py”, line 1022, in init
SMTP.init(self, host, port, local_hostname, timeout,
File “/usr/local/lib/python3.13/smtplib.py”, line 255, in init
File “/usr/local/lib/python3.13/smtplib.py”, line 341, in connect
File “/usr/local/lib/python3.13/smtplib.py”, line 1029, in _get_socket

Your smtp server refuses the login.

but why?
Where can I see, what’s the reason for the refuse is?

Good question. Worked for years with the smtp server of my ISP, about a year ago it stopped working for unknown reason. Now I use the gmail integration.

Try it with:

encryption: starttls