Any new ideas how to get email working in HG?

@Bounz I wonder if the ssl box is correcty checked in HG. Port 587 is opened and is awaiting ssl authentication from HG according to the logs and is closing without it.

Depending on what browser is used that check box can be difficult to see. I did suggest in an earlier post that this could be the cause of the problem

Maybe a manual email test script run in HG with the correct settings could narrow this possibility down.

@mike, please do the final test with EmailTester and attach console output here.
In the test please use the following parameters:

Email receiver address: [email protected]
Email sender address: your gmail email address
SMTP server (default value = smtp.gmail.com): smtp.gmail.com (because this was your case in the first post)
SMTP port (default value = 587): 587
SMTP user name: your gmail email address
SMTP user domain (leave blank, if you donā€™t know):
SMTP password: your gmail email password
Use SSL? (1-yes, 0-no) (default value = 1): 1

Pete, the light blue check for SSL in HG is VERY OBVIOUS here.

There is ZERO chance it is checked or not checked: I have tried both ways with no difference.

How do you reply with copy of previous comment?

Bounzmy thunderbird uses port 465 & SSL for gmail accounts and works. My non SSL account uses port 587 and worksā€¦

So I think I can say my network allows using either port. My router lets me type in port numbers to check if they are open thru to the internet; both show openā€¦

I now have TWO different pi zero Wā€™s on my network, each running HG fine, neither allowing email sendingā€¦

Got a windows 10 64bit machine on my network to run telnetā€¦ it does exactly the same as putty telnet did. I will try to redo emailTester as directed soon.

What version of HG is being used here and what source was it downloaded from.

As per your previous posts you are using Mono 5.4 which would rule out any security cert issues.

To assist with troubleshooting it may be best to use either the Bounz BE edition or Genes directly from the GitHub.

A vanilla version of HG without any additions or modifications on a copy of Raspbian Stretch Lite fully updated and without your HG config restore will help greatly too.

It might also help to mention what other services are running on your LAN in parallel with HG.

I strongly doubt that the stock version of HG is your problem here. The above advice will help you to rule this in or out though.


pi@raspberrypi:/tmp $ mono EmailTester.exe
Email receiver address: [email protected]
Email sender address: [email protected]
SMTP server (default value = smtp.gmail.com): smtp.gmail.com
SMTP port (default value = 587): 587
SMTP user name: [email protected]
SMTP user domain (leave blank, if you donā€™t know):
SMTP password: xxxxxxxxx
Use SSL? (1-yes, 0-no) (default value = 1): 1

System.Net.Mail.SmtpException: 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8  https://support.google.com/mail/?p=BadCredentials y11sm20546391qky.2 - gsmtp
  at System.Net.Mail.SmtpClient.CheckStatus (System.Net.Mail.SmtpClient+SmtpResponse status, System.Int32 i) [0x0001a] in <8a8abae728c244359683ef777047ab9e>:0
  at System.Net.Mail.SmtpClient.Authenticate (System.String user, System.String password) [0x00065] in <8a8abae728c244359683ef777047ab9e>:0
  at System.Net.Mail.SmtpClient.Authenticate () [0x000b1] in <8a8abae728c244359683ef777047ab9e>:0
  at System.Net.Mail.SmtpClient.SendCore (System.Net.Mail.MailMessage message) [0x00132] in <8a8abae728c244359683ef777047ab9e>:0
  at System.Net.Mail.SmtpClient.SendInternal (System.Net.Mail.MailMessage message) [0x00050] in <8a8abae728c244359683ef777047ab9e>:0
  at System.Net.Mail.SmtpClient.Send (System.Net.Mail.MailMessage message) [0x00091] in <8a8abae728c244359683ef777047ab9e>:0
  at EmailTester.Program.Main (System.String[] args) [0x000c2] in <f52881f4b95e4173863fe41e61ae275c>:0
pi@raspberrypi:/tmp $

same results on both pi sā€¦

both HGs are latest gene ones, updated via inside HG itself. habridge is also on both pi s

using my non SSL sender:

pi@X10Hub:/tmp $ mono EmailTester.exe
Email receiver address: [email protected]
Email sender address: [email protected]
SMTP server (default value = smtp.gmail.com): zmail.kilroywashere.com
SMTP port (default value = 587): 587
SMTP user name: [email protected]
SMTP user domain (leave blank, if you donā€™t know):
SMTP password: xxxxxxxx
Use SSL? (1-yes, 0-no) (default value = 1): 0

System.Net.Mail.SmtpFailedRecipientsException: failed recipients
  at System.Net.Mail.SmtpClient.SendCore (System.Net.Mail.MailMessage message) [0x002f3] in <8a8abae728c244359683ef777047ab9e>:0
  at System.Net.Mail.SmtpClient.SendInternal (System.Net.Mail.MailMessage message) [0x00050] in <8a8abae728c244359683ef777047ab9e>:0
  at System.Net.Mail.SmtpClient.Send (System.Net.Mail.MailMessage message) [0x00091] in <8a8abae728c244359683ef777047ab9e>:0
  at EmailTester.Program.Main (System.String[] args) [0x000c2] in <f52881f4b95e4173863fe41e61ae275c>:0

Youve used mono EmailTester.exe. Try it with sudo in front of it.

Also try the telnet command in your Raspbian PuTTY session to see if all is good there too.

Read here https://blog.discourse.org/2016/12/discourse-new-user-tips-and-tricks/, chapter Quoting.

@mike, GMail works for you, but have provided wrong credentials.

I donā€™t know why your own mail server doesnā€™t like [email protected] as a mail receiver, but itā€™s related to your private mail server configuration and is out of the scope of HomeGenie and mail sending.

As for now, I see that you will be able to send emails from HG right after you fix issues with credentials for GMail account. Refer to GMail help link provided in the error message youā€™ve got.

Maybe set up a new gmail account and start fresh.

No thanks. I have enough to try already.

Interesting, not may be but WAS my pi attempts! so I could send from my non SSL account it seemsā€¦ I opened putty 7:16pm, and began mono EmailTeter.exe - 1 minute before the message below. (glad I left putty open so I could see this!)


Critical security alert

A suspicious app was blocked from accessing your account

Google prevented someone from signing in to your account using a non-Google app. If this wasnā€™t you, they know your password and you should change it immediately.

Unrecognized device
Yesterday, 7:19 PM
Near Ohio, USA
.229 (IP address)

Were you recently prevented from signing in to your Google Account?

I will pursue this, along with Bounz idea to follow up on the google help comment.

Many posts ago I suggested that you check your Google Settings to see if you have Less Secure Apps enabled. That error you received is typical of a message Google will issue if you donā€™t.

Thatā€™s the reason why I suggested setting up a fresh Gmail account as your current account is now flagged. If youā€™re too busy doing others things well work away as are myself and @Bounz

Pete, as you seem to have all the answers anyway, would you like to tell why ā€˜less secure gmail settingā€™ would help this?

I donā€™t have all the answers Mike. Wish I did. What I can do is make suggestions and itā€™s up to you to try them or not.

I am of course referring to enabling less secure apps like HG access your gmail as explained here https://support.google.com/a/answer/6260879?hl=en

I assumed you had tried this already as itā€™s the first port of call for blocked email send.

But I am confused by your continued reply to let my gmail account have less security. did you not even look at my posts or last post Pete? I sent via MY smtp NON GMAIL account. I simply emailed to a gmail address. You suggest to RECEIVE emails in a gmail account from some unknown addresses that less secure must be turned on?

Ok Mike.

Google sees HomeGenie as a less secure app. If you donā€™t Allow Less Secure Apps to access your Gmail anything sent from HG will be blocked.

Just Allow Less Secure Apps be enabled in Google to test the HG email send for the purpose of this exercise. You can disable it again if you feel more comfortable.

I think Iā€™ve exhausted all my suggestions after this.

Clearly as it stands HG email notification does work. It just doesnā€™t work for you at the moment.

Mike I also meant to mention that the HG author has a GitHub set up specially for these type of issues as you know.

You might want to post your issue on his GitHub too if you have no success with both mine and @Bounz suggestions and when he gets around to it Iā€™m sure he will do all in his power to assist you.

I changed gmail to less secure and both piā€™s on m y network send emails thru mono EmailTester.exe now. Thanks for the help.

my original HG still will not send email. my new one has the 142 E-mail Account program corrupt after all my modifications and testing.

Could someone post a hgx copy of this email program please?

1 Like

Mike I strongly suggest that you start with a fresh install of HG from the recognised sources, @Bounz HG BE GitHub or Genes GitHub before you continue any further. Get the email notification working from there and then you can continue restoring your previous HG config backup.

As I mentioned before, I donā€™t have all the answers, I can only provide solutions based on the information provided from the user. I havenā€™t mastered mind reading but Iā€™m working on that too :joy:

my new pi IS a fresh install of Geneā€™s latest; I have never loaded any of my backups to this SD card yet. I did mess up the built in 142 E-mail Account program in testing so need someone to simply EXPORT it as an hgx for me to IMPORT.