This posting is not a question but more of a timesaving TIP ...
I have a couple of Android apps on the market (developed with B4A) that utilize SMTP to send emails via Google's Gmail server. Recently I was playing with one of them and was dismayed to find out that emails could no longer be sent because Google was rejecting the logins. To make a long story short, the problem was caused by Google going to a more sophisticated authentication procedure in recent(?) months, making simplistic legacy clients like my own apps fail to connect.
Short of redesigning the B4A client to match Gmail's new requirements, a customer can adjust his/her Gmail settings to allow the old authentication procedure and thus allow apps like mine to continue working (though it does make the login less secure). Here are Google's instructions:
You can switch to an app made by Google such as Gmail to access your account (recommended) or change your settings at https://www.google.com/settings/security/lesssecureapps so that your account is no longer protected by modern security standards.
In fact, the Net library used in those apps was v1.31. UseSSL was the only mode option then. So I have a feeling that upgrading Net and using StartTLSMode might do the trick ...
I have the same problem, I use StartTLSMode = true, with port 587 and also have allowed the unsecure authentication as per your first post, but still Google rejects sending the emails in my case.
Are you using 2-Step verification @Mashiane?
If you're using Google's 2-Step verification then you need to setup an extra password for apps linking to your gmail account, just one extra password for gmail via apps and SMTP will start working again.
Well that's for if you're using 2-Step verification...