add mailing system

This commit is contained in:
Tben 2022-01-06 09:13:46 +01:00
parent 9ba975cc92
commit dbc9187b90

View File

@ -52,10 +52,10 @@ export default async function handler(req, res) {
// send mail with defined transport object // send mail with defined transport object
let info = await transporter.sendMail({ let info = await transporter.sendMail({
from: email, // sender address from: email, // sender address
to: "benoti.san@gmail.com", // list of receivers to: "benoti.san@gmail.com, benoti.sanchez@gmail.com", // list of receivers
subject: "Tben Client Request", // Subject line subject: "Tben.me | Client Message", // Subject line
text: "Hello from tben", text: "Hello from tben",
html: `<h1>Message from ${name}</h1><p>${message}</p>`, // html body html: `<h1>Message from ${name}</h1><h4>Name: ${name}</h4><h4>Email: ${email}</h4><h4>Message:</h4><p>${message}</p>`, // html body
}); });
console.log("Message sent: %s", info.messageId); console.log("Message sent: %s", info.messageId);