I’m getting the following error. Any suggestions on how to fix this?
using the following text. Note: quotes, dots and @ were removed so they are not links since limit is 2.
notify:
- name: NOTIFIER_NAME
platform: smtp
server: smtp-gmail-com
port: 587
timeout: 15
sender: YOUR_USERNAMEgmail.com
encryption: starttls
username: YOUR_USERNAMEgmail.com
password: YOUR_APP_PASSWORD
recipient:- RECIPIENT_1example.com
sender_name: “SENDER_NAME”
- RECIPIENT_1example.com
Error setting up platform smtp
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 649, in auth
(code, resp) = self.docmd(“AUTH”, mechanism + " " + 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 412, in getreply
raise SMTPServerDisconnected(“Connection unexpectedly closed”)
smtplib.SMTPServerDisconnected: Connection unexpectedly closed