#Cannot get Mail notification to work

1 messages · Page 1 of 1 (latest)

covert notch
#

Hello again, hope you all are well.
I can not for the love of god get any mail notifications to work in HAOS.
My entries in the configuration.yaml are correct, and I see the connection attempt in my mail server.
And these credentials work fine on other appliances.
Tried to watch YouTube videos but they're all for gmail. I have my own mailserver.
Wish there was an easy way to simply send mails from any automation that triggers.
the https://www.home-assistant.io/integrations/smtp didn't help me to get it to work, sadly.
I dont even see a services tab in dev tools, like others do.
How do you do it?

I also tried different encryption methods, on different ports to no avail.
This is very frustrating.
The only nmotification I can get to work is the permanent one in the bottom left corner, but that is not what I need.
I need a working mail being sent with header and some text as a message.

tulip spoke
#

You're probably using quite old instructions. The services tab has been renamed to actions

covert notch
#

saw that already,
the issue is that it seems to be impossible to send mails via HAOS nowadays,
even tried GMAIL but it just throws python nonsense at me that I dont understand

Logger: homeassistant.components.automation.lifepo4_low_voltage_alarm
Source: helpers/script.py:524
integration: Automation (documentation, issues)
First occurred: 8:30:27 AM (1 occurrence)
Last logged: 8:30:27 AM

LiFePO4: LOW VOLTAGE ALARM: Error executing script. Unexpected error for call_service at pos 2: 'gmail'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1009, in _async_step_call_service
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<9 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 624, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2835, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2878, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 256, in _async_notify_message_service
    await self.async_send_message(**kwargs)
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/notify.py", line 129, in async_send_message
    registration = self.hass.data[DOMAIN][DATA_CONFIG_ENTRIES][target].data
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'gmail'
#

and when I try to perform said "action"
it just throws me this:

 Failed to perform the action notify.gmail. expected dict for dictionary value @ data['data']. Got None 
#
notify:
  - name: "gmail"
    platform: smtp
    server: "smtp.gmail.com"
    port: "587"
    timeout: "15"
    encryption: "starttls"
    sender: !secret gmail_sender
    username: !secret gmail_username
    recipient: !secret gmail_recipient
    password: !secret gmail_pass
    sender_name: "Home Assistant"
    verify_ssl: false
    debug: true
#

And yes the secrets yaml file exists and values are correct.
And yes, created a valid application password just for this non-working integration

tulip spoke
#

how do you use the action?

covert notch
#

thanks for trying to help, I have given up because I see this legacy function as broken and non-functional
Had an automation that is suppsed to send me a mail when my solar battery went under a treshold.
The automation works, sending a mail doesnt.

#
  - action: notify.notify
    metadata: {}
    data:
      message: test
      title: test
      target: gmail
    enabled: false

tried with different targets and all sorts of actions and stuffs. Ignore the "enabled" parameter, I have disabled it to not spam my logs.

worn fable
#

why aren't you just using the home assistan companion app for the notifications?

covert notch
#

isnt that just for the phone?

worn fable
#

yes it is, you're right
on the PC I always have a tab with home assistant open

another alternative that works well might be telegram - in case you're using that

covert notch
#

oh no, I am not using that and I dont want another app open on my phone, sipping battery.
But anyways, I have given up on this topic for now

tulip spoke
covert notch
#

tried that one aswell, to no avail

tulip spoke
#

I use the SMTP integration myself to send emails, and it works fine

covert notch
#

All Im getting is

Logger: homeassistant.components.smtp.notify
Source: components/smtp/notify.py:252
integration: smtp (documentation, issues)
First occurred: 6:10:44 PM (2 occurrences)
Last logged: 6:10:44 PM

SMTPException sending mail: retrying connection
#

but the gmail server is definitely pingable and dns works

#

oh this is rudiculous now after just changing the port to 465 it does not work anymore at all, configuration is correct

The automation "LiFePO4: LOW VOLTAGE ALARM" (automation.lifepo4_low_voltage_alarm) has an unknown action: notify.gmail.

even though this fucking crap exists in my god damn conf yaml... what is this nonsense

covert notch
#

Update:
Found an easy integration on HACS that just worked on the first try...