I am using nodemailer
to send emails on my server node, however I did not like to store all HTML
in a variable, I would like to know if it is possible to leave saved in a arquivo.html
and just call the content of it to send that email. I'm currently using it that way.
conta.sendMail({
from: '[email protected]',
to: req.body.nome+' <'+req.body.email+'>',
subject: 'ASSUNTO',
html: html
}, (err) => {
if(err){
throw err
}else{
console.log('Email Enviado')
}
})
The variable html
is being declared with all html
that I will send.