Open nicx opened 3 months ago
Got the same issue. SMTP Integration seems to be very unstable. A config-reload brings the service back to action....
Also i guess if the Network / Internet connection is broken for a while, Notify-SMTP-Integration is lost till HA Configuration is reloaded in Developer-Tools.
My Config:
notify:
- name: "apple_mail_notification_customdomain_tld"
platform: smtp
sender: "notification@customdomain.tld"
recipient: "blahblah@icloud.com"
server: "smtp.mail.me.com"
port: 587
timeout: 5
username: "blahblah@icloud.com"
password: 'blahblah-my-app-specifiy-password'
encryption: "starttls"
sender_name: "HomeAssistant"
verify_ssl: false
debug: true
I have 2 almost identical "Send Mail" services. Since this week(maybe Core 2024.3.3?) only one of them ist working. I experimented a little and found the reason: The not-working Mail has an "Umlaut" "ö" in the Text. Deleted the "ö": SMTP is working, changed it back: not working. Maybe that helps a little
Oh okay, but you mean within the config or within for example the message or subject of the mail which should be sent? Im using a HTML-Formatted Mail content...
The Umlaut was in the message.
Okay, yeah, checked all my Mail Templates but there are no Umlauts used... So really strange.
Did a test at my production instance running HA OS. The SMTP notification service just works fine for me. What mail provider are you having issues with? If it is a public provider I could may be do a test. No credentials needed.
The issue is only happening sometimes (on my end). So i had the issue twice till now: "Service is not available" after a config-reload the automation worked again... im not sure when this is happening.
Im using my iCloud+ Account with Custom-Domain for sending the Mails.
can you share the host name of the SMTP server you are using, only if it is a public server?
its not a public one..
notify:
- name: "apple_mail_notification_customdomain_tld"
platform: smtp
sender: "notification@customdomain.tld"
recipient: "blahblah@icloud.com"
server: "smtp.mail.me.com"
port: 587
timeout: 5
username: "blahblah@icloud.com"
password: 'blahblah-my-app-specifiy-password'
encryption: "starttls"
sender_name: "HomeAssistant"
verify_ssl: false
debug: true
the issue is not permanent here, too. sometimes it works after a reboot, sometimes not. sometimes the servic crashes even it was running after some hours. I recognize the crash becuse i get a message that my automation cannot fint the notify service anymore.
in my case i am using a local exim mailserver (as a relay) without authentification. as already said, thos worked for years without any problems. there is no error log or any other log on the exim side. its just the ha smtp integration crashing :(
I think the smtp
integration should be moved to use config flow. This enables to make the entry startup more robust. But the logging is not handled in an optimal way either.
you mean to separate it into another .yaml file?
No, but use a config entry, it will also allow it to be set up from the ui
I think I have the same issue. `Logger: homeassistant.components.notify Source: components/notify/legacy.py:104 integration: Notifications (documentation, issues) First occurred: 23:06:52 (3 occurrences) Last logged: 23:07:27
Error setting up platform smtp Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 104, in async_setup_platform notify_service = await hass.async_add_executor_job( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TimeoutError: timed out`
EDIT: My issue was indeed a time-out connection, because HA was trying to use the wrong interface (multi-homed HA).
The problem
The SMTP component is no more working since some time. Until a few weeks ago, it worked for years. after restarting home assistant, it may sometimes work, but most of the time I get an error message in the log file (see below). Unfortunately I do not now when exactly the problem began.
I did not do any changes on the mailserver side. It is a simple relay exim mailserver. All other mail clients using that mailserver are working without problems for years, too.
What version of Home Assistant Core has the issue?
2024.3.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
SMTP
Link to integration documentation on our website
https://www.home-assistant.io/integrations/smtp/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response