Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nodemailer not working on Amazon EC2 instance

I am EC2 instance up and running , I wanted to integrate nodemailer in my application. Following the https://www.npmjs.com/package/nodemailer I was able to send email from my localhost. When the same code I integrated on EC2 instance I am getting Invalid login error . Sometime gmail blocks login from other application and send confirm mail to the inbox. I didnt get any such mail also. Do I need to enable some port on EC2 instance or I can use nodemailer at all on EC2 instance. Please suggest

like image 323
Sharanabasu Angadi Avatar asked Apr 28 '15 12:04

Sharanabasu Angadi


1 Answers

Gmail is not a production SMTP service. Configure nodemailer to send mail from a production mailer, such as AWS Simple Email Service. Like gmail, SES is a "well-known service" in nodemailer. There's a great example of using SES in the nodemailer README.

like image 91
tedder42 Avatar answered Oct 03 '22 14:10

tedder42