Gmail notification no longer works?

I have been using this for years but in the last few weeks it stopped working. Upon investigating, it seems that Home Assistent no longer finds my notify component.

Example automation to test email

alias: Email test
description: ""
mode: single
triggers:
  - at: "19:25:00"
    enabled: false
    trigger: time
conditions: []
actions:
  - data:
      message: This is a test
      title: HA - test
      target:
        - [email protected]
    action: notify.gmail_xxx

configuration.yaml

# SMTP Gmail notification
notify:
  - name: "gmail_xxx"
    platform: smtp
    server: "smtp.gmail.com"
    port: 587
    timeout: 15
    sender: "[email protected]"
    encryption: starttls
    username: "[email protected]"
    password: my_password
    recipient:
      - "aaaa"
    sender_name: "Home Assistent"

When i open my example automation and run it, it says ā€œAction notify.gmail_xxx not foundā€

I’ve started seeing this same issue today. My logs show that the SMTP integration is failing to load because Google is rejecting my username/password combo.

I can sign in just fine to mail.google.com and I’ve got the ā€œLess secure app accessā€ option enabled on my account.

Logs show:

Logger: homeassistant.components.smtp.notify
Source: components/smtp/notify.py:165
integration: smtp (documentation, issues)
First occurred: 8:46:57 AM (3 occurrences)
Last logged: 8:46:57 AM

Login not possible. Please check your setting and/or your credentials
Traceback (most recent call last):
  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.13/smtplib.py", line 750, in login
    raise last_exception
  File "/usr/local/lib/python3.13/smtplib.py", line 739, in login
    (code, resp) = self.auth(
                   ~~~~~~~~~^
        authmethod, getattr(self, method_name),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        initial_response_ok=initial_response_ok)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/smtplib.py", line 662, in auth
    raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. For more information, go to\n5.7.8  https://support.google.com/mail/?p=BadCredentials 41be03b00d2f7-b15faee61e1sm11267342a12.78 - gsmtp')

Got the same problem too. Switched from the smtp integration to the google mail integration

Are you able to get attachments to send using the Google Mail Integration? Using the code I previously had for SMTP doesn’t work, the attachments never come through.

  - action: notify.mygmailaddress_gmail_com 
    data_template:
      target: [email protected]
      title: 'CCTV Images'
      message: "CCTV Images"
      data:
        images:
          - /config/www/camera_snapshots/front_door_alarm.jpg
          - /config/www/camera_snapshots/driveway_alarm.jpg
          - /config/www/camera_snapshots/street_view_zoom_alarm.jpg
          - /config/www/camera_snapshots/garden_shed_alarm.jpg

Never tried it, but I found this:

Seems waiting to be merged.

1 Like