I tried using the GMAIL SMTP server to send OTP and it worked. Here is how you can do it:
- Open your gmail account. Go to Account> Security settings and turn on less secure app access.
- Go to api_config.properties on the server. Set the credentials to your email in the username and password section. Set server to smtp.gmail.com and port 587.
- Try using the otp service now and you should receive an email stating “google blocked a sign-in attempt”. Unblock the same. and try again. You should be good to go.
Let me know if you have issues. Please see google does not allow too many smtp emails and might charge beyond a certain point. But it is helpful when you are trying out the same.