Wow! I was getting the error below because I was using a weak password...
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.
After I tried almost everything I found a post from this guy:
THE FOLLOWING WILL ALMOST CERTAINLY BE THE ANSWER TO YOUR QUESTION IF ALL ELSE HAS FAILED:
I got the exact same error, it turns out Google's new password strengh measuring algorithm has changed deeming my current password as too weak, and not telling
me a thing about it (not even a message or warning)... How did I discover this? Well, I chose to change my password to see if it would help (tried everything
else to no avail) and when I changed my password, it worked!
Then, for an experiment, I tried changing my password back to my previous password to see what would happen, and Gmail didn't actually allow me to do this,
citing the reason "sorry we cannot allow you to save this change as your chosen password is too weak" and wouldn't let me go back to my old password. I figured
from this that it was erroring out because either a) you need to change your password once every x amount of months or b). as I said before, their password
strength algorithms changed and therefore the weak password i had was not accepted, even though they did not say anything about this when trying to login
ANYWHERE! This (number 2) is the most likely scenario, as my weak password was about 4 months old, and it let me use it in Gmail.
It's pretty bad that they said nothing about this, but it makes sense. Because most hijacked emails are logged into using software outside of gmail, and I'm
guessing you are required to have a stronger password if you want to use Gmail outside of the Gmail environment.
I hope this helps!