SMTP not working and SMTP integration not available

Make sure to generate an app password if you are using Gmail and have MFA turned on.

Just want to mention to anybody else who finds this thread.

I’m running an smtp server on my network that I’m pointing home assistant at. I had it working, then it stopped working at some point recently. The notify service would appear only if I put in an invalid IP address. I had to set verify_ssl to false in my configuration. I’m guessing a recent update changed the default value.


THANK YOU DAVID!!! THIS WAS IT!!! Created an account just to tell you adding that line completely fixed my issue. What a pita!

David, thanks for that update. Some recent update (or maybe in the last couple of years) broke my email notifications, and the verify_ssl: false addition to my smtp config fixed the sending issue. In the logs it would show that the service wasn’t available, and your line fixed the issue.

Thanks again!

P.S. I am running my own local email server, which might have something to do with why it’s now required. I use self signed ssl certs.

I have the same problem and errors:

2022-11-15 21:05:09.983 ERROR (MainThread) [homeassistant.components.notify] Error setting up platform smtp
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/", line 398, in getreply
    line = self.file.readline(_MAXLINE + 1)
  File "/usr/local/lib/python3.10/", 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/", line 92, in async_setup_platform
    notify_service = await hass.async_add_executor_job(
  File "/usr/local/lib/python3.10/concurrent/futures/", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/smtp/", line 92, in get_service
    if mail_service.connection_is_valid():
  File "/usr/src/homeassistant/homeassistant/components/smtp/", line 154, in connection_is_valid
    server = self.connect()
  File "/usr/src/homeassistant/homeassistant/components/smtp/", line 140, in connect
    mail = smtplib.SMTP(self._server, self._port, timeout=self._timeout)
  File "/usr/local/lib/python3.10/", line 255, in __init__
    (code, msg) = self.connect(host, port)
  File "/usr/local/lib/python3.10/", line 343, in connect
    (code, msg) = self.getreply()
  File "/usr/local/lib/python3.10/", line 401, in getreply
    raise SMTPServerDisconnected("Connection unexpectedly closed: "
smtplib.SMTPServerDisconnected: Connection unexpectedly closed: timed out