0

I want to log in to my gmail account from an Heroku app using PHPMailer but gmail restricts access since the remote server is an unknown device. Is there a workaround to this? I have tried using the captcha but its not helping.

Please note that i have no issue connecting to gmail on localhost. Problem comes when i deploy and my guess is that it is because gmail restricts it.

dopesky
  • 190
  • 9

1 Answers1

1

I actually stumbled across an answer. The solution is to actually follow this link and follow the instructions. First you have to allow less secure apps setting in your gmail account. Before following the link you have to sign out from all logged in accounts so that you do not allow for the wrong email. My mistake was that i followed the link before logging out thus allowed for a different email.

dopesky
  • 190
  • 9