I am using nodemailer with email-templates. I can send emails to users. The only issue I am facing that it is previewing emails every time. Will you please tell me how can I disable it?
var email = new EmailTemplate({
message: {
from: 'abc@****.com',
},
// uncomment below to send emails in development/test env:
send: true,
transport: {
jsonTransport: true
},
preview:'production', // tried with production and development but is of no use
views: {
options: {
extension: 'ejs' // <---- HERE
}
}
});
Silly mistake, but I just need to add preview:false