SMTP No Longer Working with Upgrade to 2024.10

Hello. As recently as last night, SMTP worked appropriately.
I upgraded to 2024.10 this morning and SMTP no longer seems to work. No other changes were made.

I realize that there are other potential confounders, but it appears, from this perspective, that the upgrade broke SMTP.

Here’s what I get:

The automation “Automation Name” (automation.automation_name) has an unknown action: notify.to_gmail.

This error prevents the automation from running correctly. Maybe this action is no longer available, or perhaps a typo caused it.

To fix this error, edit the automation and remove this action.

Select Submit below to confirm you have fixed this automation.

And, from the log:

Logger: homeassistant.components.automation.automation_name
Source: helpers/script.py:2026
integration: Automation (documentation, issues)
First occurred: 16:07:57 (3 occurrences)
Last logged: 16:08:23

Automation Name: Error executing script. Service not found for call_service at pos 2: Action notify.to_gmail not found

Logger: homeassistant.components.notify
Source: components/notify/legacy.py:108
integration: Notifications (documentation, issues)
First occurred: 16:07:10 (2 occurrences)
Last logged: 16:07:10
Error setting up platform smtp

Traceback (most recent call last):
File “/usr/local/lib/python3.12/smtplib.py”, line 398, in getreply
line = self.file.readline(_MAXLINE + 1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/socket.py”, line 708, in readinto
return self._sock.recv_into(b)
^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/ssl.py”, line 1252, in recv_into
return self.read(nbytes, buffer)
^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/ssl.py”, line 1104, 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(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/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 103, in get_service
if mail_service.connection_is_valid():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/smtp/notify.py”, line 165, in connection_is_valid
server = self.connect()
^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/smtp/notify.py”, line 158, in connect
mail.login(self.username, self.password)
File “/usr/local/lib/python3.12/smtplib.py”, line 739, in login
(code, resp) = self.auth(
^^^^^^^^^^
File “/usr/local/lib/python3.12/smtplib.py”, line 653, in auth
(code, resp) = self.docmd(response)
^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/smtplib.py”, line 432, in docmd
return self.getreply()
^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/smtplib.py”, line 401, in getreply
raise SMTPServerDisconnected("Connection unexpectedly closed: "
smtplib.SMTPServerDisconnected: Connection unexpectedly closed: The read operation timed out

And, to be complete, from configuration.yaml (again, no changes here):

notify:

Is there something that I am overlooking, or is there a conflict with the update? Thank you.

Something to do with Outlook mail server using OAuth2

Oh, I bet that’s what happened. I think that you’re right. Thanks.

Hi all
just like you i am also get same error whit automation that send email with camera snapshot - up until the last update all works fine - after the update the notify service no longer exists in the UI and can not choose in the action in automation - i do not think its related to OAuth2 or outlook mail - i have private mail server and it work fine until the update - can anyone check this in HA staff?

I upgraded to 2024.10 a few days ago and smtp notifications via gmail stopped working.

I have in my /homeassistant/configuration.yaml

# files added
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
command_line: !include command_line.yaml
template: !include templates.yaml
notify: !include notify.yaml
sensor: !include sensors.yaml

and in my /homeassistant/notify.yaml

# Notificaciones via: Mail
- name: mail_javier
  platform: smtp
  server: smtp.gmail.com
  port: 587
  timeout: 15
  sender: [email protected]
  encryption: starttls
  username: [email protected]
  password: yyyyyyyyyyyyyyyyy
  recipient:
  - [email protected]
  sender_name: HA_Piso4v

the notify.mail_javier action is no longer available while the other defined notifications are still available for test in the developer tools

I found the error, gmail has deleted my application key. I just had to re-generate an application key for gmail, enter it in home assistant and restart home assistant. Everything works fine again.

So, I switched from an Outlook account to a Yahoo account and the problem has been “solved”. For me, then, the issue was indeed probably the OAuth2 switch on Outlook’s part, not the upgrade. Has there been a feature request to add OAuth2 to SMTP to allow for this? I couldn’t find one.