本文に異なるメッセージを含むメールを送信する方法。同じメッセージを別の人に送信する方法は知っていますが、特定のパターンで別のメッセージ本文を別の受信者に送信する方法がわかりません。
`var mailOptions = {
from: "xyz <xyz@gmail.com>", // sender address
to: "abc@abc.com, lmn@lmn.com, akb@gmail.com", // list of receivers
subject: "Hello ", // Subject line
text: "Hello world ", // plaintext body
html: "<b>Hello world </b>" // html body
};`
// send mail with defined transport object
smtpTransport.sendMail(mailOptions, function(error, response){
if(error){
console.log(error);
}else{
console.log("Message sent: " + response.message);
}
// if you don't want to use this transport object anymore, uncomment following line
//smtpTransport.close(); // shut down the connection pool, no more messages
});
異なる受信者に対して同じメッセージ