0
votes

I have my Node.js application hosting in Openshift to test it and I want to send email. I have a contact form and I would like to receive the message by mail. In local I setup nodemailer with my Gmail account but when I try it in Openshift it does't work because of the security conditions of Google...

I don't have any idea to solve this so if someone had a trick !

Thank's

1
you'll need to create an application password for your account at Google, and then use that password in your application.saljuama
There's special instructions for setting up gmail on nodemailer github page > To use Gmail you may need to configure "Allow Less Secure Apps" in your Gmail account unless you are using 2FA in which case you would have to create an Application Specific password. You also may need to unlock your account with "Allow access to your Google account" to use SMTP.laggingreflex
I will try to create an application password for my Google account... @laggingreflex I tried to "Allow Less Secure Apps" and it works for my local dev but it didn't work online...Hugo
@saljuama How do you create an application password in Google I don't find this page ? I have to create a pro account ?Hugo
App passwords page, it will redirect to your account, and i think you must enable 2-step verification.saljuama

1 Answers

0
votes

Like @saljuama said you have to enable 2-step verification. And after create an application password.