I am working on EmailSender project using node.js. I found that nodeemailer package is the really making it easier.
But when I sending email to multiple contacts , all contact were seeing the other contact addresses in to column.
I want to hide others from the receiver. That is receiver could only see his email address only.
The code I am using is,
var mailOptions = {
from: '[email protected]', // sender address
to: '[email protected],[email protected]', // list of receivers
subject: 'Hello', // Subject line
text: 'Hello world', // plaintext body
html: '<b>Hello world</b>' // html body
};
transporter.sendMail(mailOptions, function(error, info) {
if (error) {
res.send(error);
} else {
res.send('Message sent: ' + res);
}
});
The question is when receiver1 gets the email, he should not know that receiver2 got the same email.
Thanks.
This post was added pretty long time ago, but if you are looking for the answer, it is really simple - instead field
to:
, usebcc:
.