When I was using amazon EC2 free instance, and in my Node API project, I used Nodemailer to sent emails from my GMAIL account, and that was running perfectly without any issue, but not I have moved on to the Amazon lightsail for production, with the same code I can not send email.
I have opened all the ports in lightsail which I had in EC2 instance.
I have tried all other possible ways but it isn't working. I am getting no errors.
This is my code to send email
const mailOptions = {
from: email.from || emailSettings.auth.user,
to: email.to,
subject: email.subject,
attachments: email.filePath,
html: email.template
};