How to solve “Gmail Error: Password not accepted from server”

SMTP -> ERROR: Password not accepted from server: 535-5.7.1 Please log in with your web browser and then try again. Learn more at 535 5.7.1 https://support.google.com/mail/bin/answer.py?answer=78754 ru4sm6912310pbc.25 SMTP Error: Could not authenticate. Gmail phpmailer will prompt error like this normally when you changed the running script from one server o another. Even the Gmail account