SMTP not working

Hi there, I’m trying to add an SMTP account to my HA config file but for some reason it seems to not be working.

I followed the instructions on: https://www.home-assistant.io/integrations/smtp
and when I put in the configuration file the sample example:

notify:
  - name: Alex
    platform: smtp
    sender: YOUR_SENDER
    recipient: YOUR_RECIPIENT

It actually shows up in services under notify.Alex BUT when I add the following details about the SMTP config:

notify:
  - name: Alex
    platform: smtp
    server: smtp.gmail.com
    port: 587
    timeout: 15
    sender: [email protected]
    encryption: starttls
    username: [email protected]
    password: my_email_password
    recipient: [email protected]        
    sender_name: House Security Alert

the notify.Alex under services disappears!, it seems that when I add the line server: smtp.gmail.com is when the entry for notify.Alex under services no longer shows up.

I have the App installed on my phone, so under services, there is a notify.mobile_app_p028 and when I test a sample payload such as:

{
  "message": "Test"
}

It works perfectly and I receive the notification on my phone, but the moment I add the line server: smtp.gmail.com and fill in the rest of the info such as the ports and username/pass, the entry for notify.Alex just disappears from services and I restarted HA multiple times but still nothing.

I’m running the latest version of Home Assistant on Ubuntu 18.04.4 LTS.

Any help regarding this would be greatly appreciated it. Thanks!

1 Like

Did you enable 3rd party apps in the google settings? Do you get any errors in the logs?

Hi, yup I enabled 3rd party apps on that google gmail account and there are no errors in the log. The problem is that the moment I add the line

server: smtp.gmail.com

the notify.Alex disappears from services. So its not even getting to the point where it tries to connect to Gmail and there is an error, it simply just disappears. Other people were reporting the same thing happening and it just started appearing to them again but they’re not sure what did it. I was hopping that someone can tell me what causes this and and how can it be solved?

Did you try removing it from the config, restart HA, add the full config again and then restart HA again.

Yup, did a combination of all that but still nothing, not only that but I restarted not just HA but the entire server, a complete cold reboot multiple times. Nothing.

Anyone have the same problem?

Have you solved that issue…???

Just starting having the same issue after upgrade. Still no solution??

yes, same problem, did you find a solution ?

best regards

I have registered just for this topping, I have been struggling with this 4 hours now. I know its 2 years late but maybe someone will find this helpfull.
All you have to do is put your password in double quotes as it is a string :D.
Good luck.

I am having the same issue and I already have password in double quotes, but it is exactly what op was experiencing. As soon as I remove smtp.gmail.com the notify.xxx works but when I add it back the notify.xxx disappears.

Update: I had to use app password from google to get it to work

As posted in what seems to be a similar thread “smtp no longer shows up as a service”
I also am having this exact problem, is there any resolution?
I have upgraded to version 2022.9.5 and after that the notify.xxx is no longer visible. I have my own mail server that I am trying to connect to, but like the above the service is not visible to be used