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.

I believe the typical way to handle this (regardless of language, framework or library) is to send the email to a completely unrelated email address, typically something like
[email protected]; then you would put the recipients into the BCC list. Note that this increases the odds of the message being flagged as spam by the recipients' email providers, so the safest solution is usually to send the message to each recipient individually.