Email error 80040211


Recommended Posts

Any error code that is 8 digits and starts with 800 or similar when doing any network function is going to be a standard networking error code which you can search the internet for.  That said, I get a different error, namely that the username / password are not accepted.  This appears to be because Google is no longer accepting logins with just username / password.  It is once again a case of a big company using excessive requirements to fix security issues that don't apply in all cases.  You can read about it here:

https://support.google.com/accounts/answer/6010255?hl=en&utm_source=google-account&utm_medium=profile-less-secure-apps-card

You have two solutions for now:

1) get a google workspace account, though this is probably a bandaid as I am guessing they may eventually make the same change.  They might not because a lot of corporate customers do things like alarming etc with older hardware and are going to balk at having to replace it all just because the guy down the hall doesn't know how to be safe on the web, but you never know

2) use a different email service for your outgoing emails

We will look into using a login they accept, but it will be some time before anything can be implemented.  Of course the best way to ensure you aren't subject to the whims of google or some other big company is to install an email server of your own that only does outgoing email.  You could then use a whitelist in addition to user/password combo to really button down the security, though really, if you are only using the outgoing email address for alarms and notifications to a select few, and never giving it to any website, there is no reason a hacker would pick it up.

 

Link to comment
Share on other sites

It actually does, it's just more roundabout than before.   You have to set up the GMail account to use 2 Factor authentication.     Then, while logged into your account, you can get GMail to generate a new password to use with "less secure" devices (or software) that can only do username + password.   I guess GMail assumes that if you're logged in using 2FA to generate the password, then the necessary enhanced security wonderfulness will rub off on that password.    I do this with PLCs quite a bit, and there's a step by step instructions on how to set GMail up for this at  ttps://forum.hosteng.com/index.php?topic=3163.0.   Scroll all the way down to the bottom of the page.

Link to comment
Share on other sites

OK, good to know. I couldn't find that "less secure" setting when I looked, but maybe it was because 2 factor was turned off.  I can't imagine that gmail will stop allowing this.  It will kill a LOT of automation devices.  Maybe we need to get a petition going? :)

 

Link to comment
Share on other sites

9 minutes ago, AzeoTech said:

OK, good to know. I couldn't find that "less secure" setting when I looked, but maybe it was because 2 factor was turned off.  I can't imagine that gmail will stop allowing this.  It will kill a LOT of automation devices.  Maybe we need to get a petition going? :)

 

Or build an SMTP server.   And yeah, I think you have to enable 2FA to get it working.

Link to comment
Share on other sites

Thanks Steve, but still no luck for me unfortunately.

2 Step verification is on, and I have generated an "app password."

image.png.d03414ccdd752aec481983e18162fd31.png

image.png.3889c070a4819f24546dc8a5804717d7.png

private semail = new(CEMail)
semail.strhost = "smtp.gmail.com"
semail.port = 465
semail.strUserName = "<gmail_address>"
semail.strPassword = "<app_password>"
semail.strAuthenticate = "AuthLogin"
semail.strBody = "this is a test"
semail.strReplyAddress = "<gmail_address>"
semail.strReplyName = "<gmail_address>"
semail.strSubject = "test subject"
semail.strTo = "<gmail_address>"
semail.strConnectionType = "STARTTLS"
semail.strSSLProtocol = "TLSv1_2"
semail.Send()

Error 80040227 every time. Tried port 25, 465, 587.

Help please!

Link to comment
Share on other sites

Finally got this going today, using these credentials:

private semail = new(CEMail)
semail.strhost = "smtp.gmail.com"
semail.port = 587
semail.strUserName = "<gmail_address>"
semail.strPassword = "<app_password>"
semail.strAuthenticate = "AuthLogin"
semail.strBody = "this is a test"
semail.strReplyAddress = "<gmail_address>"
semail.strReplyName = "<gmail_address>"
semail.strSubject = "test subject"
semail.strTo = "<gmail_address>"
semail.strConnectionType = "STARTTLS"
semail.strSSLProtocol = "TLSv1_2"
semail.Send()

These are my original settings, so it seems there is something else going on beyond just having the right code and account settings. For anyone else reading this, I'd recommend logging out and back in to your google account every day until it starts working.

I suspect Google is blocking access for a period of time; I had a similar problem last year (https://support.azeotech.com/topic/4251-twitter-feed-anyone/):image.thumb.png.5978725cfa695a70c56049d5939083cf.png

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.