Hello! I am new to HA. I’m trying to setup SMTP to be able to send text alert to my phone. I have followed the instructions in HA (SMTP - Home Assistant). There is an error in that example (sender_name: is wrong! it should be just sender:). Anyway I use Google and Google needs an App Password so I created an App Password in Google so I can use it in conjunction with my SMTP setup. However, I still get an error when HA tries to connect to the Google SMTP server.
smtplib.SMTPAuthenticationError: (534, b’5.7.9 Application-specific password required. Learn more at\n5.7.9 Sign in with App Passwords - Google Account Help cm8-20020a056830650800b00636ed80eab8sm530290otb.4 - gsmtp’)
2022-08-12 12:53:48.497 ERROR (MainThread) [homeassistant.components.notify] Failed to initialize notification service smtp
The error is pointing to the use of Application-specific password, which I’m already using. Here’s my Config:
Have you tried doing an SMTP setup with say a simple email client? That error looks to be a Google error. Google is trying to completely do away with password-based email authentication. If you can confirm that you can use the same configuration you are trying to use on HA with something like the Thunderbird email client then you will know for sure if this is a Google/Gmail Account configuration issue or a HA configuration issue.
Oh! I think my text went through the Gmail SMTP server! I opened my “Sent” folder in GMail and the text message was sent. Although, the mobile carrier of my iPhone hasn’t delivered it to me!
I think this is a step forward to my project of being able to text me whenever there is an important event in my Home Assistant.
There you go. Also another thing to be clear on with the SMTP configuration is that there is a difference between sender & sender_name those are two different configuration items. The sender is the email address and the sender_name is the name you want to go along with the email address.
Moderator: Please consider this closed. Thank you.
I have successfully fixed my Configuration and Automation files and my text alerts are working. However I’d like to make an RFC: make multiple recipients in the smtp directive in the configuration.yaml (example below), instead of creating multiple name1/recipient1 then name2/recipient2, etc…
I know this is an old thread, and this is a noob question, but I am struggling to get the SMTP integration to work and one key point of confusion is the use of quotes. I see in the SMTP setup examples quotes are used, but I see many posts with quotes omitted. My integration is not working consistently with or without, but knowing whether quotes are required would at least eliminate that as a potential issue. So are quotes required as shown in the doc, and if I use a secret for my password, I assume in that case all I need is the reference to the password entry (e.g. !secret foobar vs. “!secret foobar”)?
I did get it working. Someone on the integration page told me the quotes were optional. I think I omitted them, but at any rate I did eventually get it working. Thanks!