This is my settingController:
var sendSmtpMail = function (req,res) {
var transport = nodemailer.createTransport({
service:\'gmail\',
auth: {
Make sure you are using the right port: ie port: 587
as of now.
Visit this link to allow Less secure App access: https://myaccount.google.com/lesssecureapps
Enable the recaptcha at this link: https://accounts.google.com/b/0/DisplayUnlockCaptcha
Wait for a few minutes and try to send an email.
Alternatively use sendgrid. It has a free version.
If you are not seeing the emails in your inbox, check the Spam folder.