const transporter = nodeMailer.createTransport({
host: process.env.SMTP_HOST,
port: 587,
secure: false,
auth: {
user: process.env.SMTP_MAIL,
pass: process.env.SMTP_PASSWORD,
},
});
const mailOptions = {
from: process.env.SMTP_MAIL,
to: emailUser.email,
subject: emailUser.subject,
text: emailUser.message,
};
await transporter.sendMail(mailOptions);