Trying to set-up an e-mail Notify in yaml configuration file and I did have a service listed once, but the send failed. I’ve since tried various formats to try to get the notification working, but now I’ve completely lost the service.
My yaml reads as follows:
notify:
- name: email_notification
platform: smtp
server: premium119.web-hosting.com
port: 465
timeout: 15
sender: [email protected]
recipient: [email protected]
verify_ssl: true
username: [email protected]
password: xxxxxxxxxxxxxxxxxx
My error log reads as follows:
Error setting up platform smtp
Traceback (most recent call last):
File “/usr/local/lib/python3.10/smtplib.py”, line 398, in getreply
line = self.file.readline(_MAXLINE + 1)
File “/usr/local/lib/python3.10/socket.py”, line 705, in readinto
return self._sock.recv_into(b)
TimeoutError: 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 93, in async_setup_platform
notify_service = await hass.async_add_executor_job(
File “/usr/local/lib/python3.10/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/homeassistant/homeassistant/components/smtp/notify.py”, line 100, in get_service
if mail_service.connection_is_valid():
File “/usr/src/homeassistant/homeassistant/components/smtp/notify.py”, line 162, in connection_is_valid
server = self.connect()
File “/usr/src/homeassistant/homeassistant/components/smtp/notify.py”, line 148, in connect
mail = smtplib.SMTP(self._server, self._port, timeout=self._timeout)
File “/usr/local/lib/python3.10/smtplib.py”, line 255, in init
(code, msg) = self.connect(host, port)
File “/usr/local/lib/python3.10/smtplib.py”, line 343, in connect
(code, msg) = self.getreply()
File “/usr/local/lib/python3.10/smtplib.py”, line 401, in getreply
raise SMTPServerDisconnected("Connection unexpectedly closed: "
smtplib.SMTPServerDisconnected: Connection unexpectedly closed: timed out