I don't get SMPT to work

Hi,
I am trying to send an Email based on a event. But somehow I don’t get the first step to work. As the SMTP integration I use :

notify:

  • name: “mailalert”
    platform: smtp
    server: “www.xxxxxxx.xx”
    encryption: starttls
    port: 587
    sender: “[email protected]
    recipient: “[email protected]
    username: “zzz”
    password: “xxxxxxxxxxxxxxxxxx”

in the configuration.yaml file. But it doesn’t create the mailalert notify integration.

Outlook uses the same parameters (server, port, encryption, user etc) and it works.
HA doesn’t. But I don’t know what i am doing wrong.

Did you restart HA?

Yes, I did. In the log I get an errormelding …

Error setting up platform smtp
Traceback (most recent call last):
File “/usr/local/lib/python3.14/smtplib.py”, line 405, in getreply
line = self.file.readline(_MAXLINE + 1)
File “/usr/local/lib/python3.14/socket.py”, line 725, in readinto
return self._sock.recv_into(b)
~~~~~~~~~~~~~~~~~~~~^^^
File “/usr/local/lib/python3.14/ssl.py”, line 1304, in recv_into
return self.read(nbytes, buffer)
~~~~~~~~~^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.14/ssl.py”, line 1138, in read
return self._sslobj.read(len, buffer)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
TimeoutError: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/notify/legacy.py”, line 108, in async_setup_platform
notify_service = await hass.async_add_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
platform.get_service, hass, p_config, discovery_info
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File “/usr/local/lib/python3.14/concurrent/futures/thread.py”, line 86, in run
result = ctx.run(self.task)
File “/usr/local/lib/python3.14/concurrent/futures/thread.py”, line 73, in run
return fn(*args, **kwargs)
File “/usr/src/homeassistant/homeassistant/components/smtp/notify.py”, line 108, in get_service
if mail_service.connection_is_valid():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File “/usr/src/homeassistant/homeassistant/components/smtp/notify.py”, line 172, in connection_is_valid
server = self.connect()
File “/usr/src/homeassistant/homeassistant/components/smtp/notify.py”, line 165, in connect
mail.login(self.username, self.password)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.14/smtplib.py”, line 751, in login
(code, resp) = self.auth(
~~~~~~~~~^
authmethod, getattr(self, method_name),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
initial_response_ok=initial_response_ok)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.14/smtplib.py”, line 660, in auth
(code, resp) = self.docmd(response)
~~~~~~~~~~^^^^^^^^^^
File “/usr/local/lib/python3.14/smtplib.py”, line 439, in docmd
return self.getreply()
~~~~~~~~~~~~~^^
File “/usr/local/lib/python3.14/smtplib.py”, line 408, in getreply
raise SMTPServerDisconnected("Connection unexpectedly closed: "
+ str(e))
smtplib.SMTPServerDisconnected: Connection unexpectedly closed: The read operation timed out

similar as this?: