I developed a desktop software that gives the option of changing the password to the user if he forgets it, and to reset the password an automatic email should be sent to the user email using Gmail SMTP with a verification code. this was working fine until a lot of users start using this function (users from different countries), then my Gmail starts blocking the app from sending emails to the users because of the differents IP's that each user has... I start receiving this email from Gmail:
Someone has your password
Hi Youssef, Someone just used your password to try to sign in to your Google Account example@gmail.com, using an application such as an email client or mobile device. Details: Friday, July 28, 2017 7:37 PM (Egypt Time) Egypt* Google stopped this sign-in attempt, but you should review your recently used devices...
Is there any solution for this, please?
NOTE: I'm allowing access to less secure apps.
Thanks in advance