SyntaxFix
Write A Post
Hire A Developer
Questions
If you are in a test environment and do not want to set security settings you have to allow less secure apps via. this link in Gmail.
https://myaccount.google.com/lesssecureapps