nodemailer / smtp-server

Create custom SMTP servers on the fly
Other
862 stars 146 forks source link

BCC Addresses Not Coming Through #119

Closed codesticle closed 4 years ago

codesticle commented 5 years ago

We are using this from the documentation to stream the message. The message has TO, CC, and BCC addresses.

const server = new SMTPServer({ onData(stream, session, callback) { stream.pipe(process.stdout); // print message to console stream.on("end", callback); } });

When examining the output, the TO and CC do appear, but the BCC addresses are missing:

From: "Test test@test.com To: recipient@test.com Cc: robert@test.com, john@test.com Date: 31 Jan 2019 12:04:27 -0600 Subject: Test Email Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: quoted-printable

I'll also add that the logs do show that the addresses are being recognized when the email is received by the smtp-server:

[2019-01-31 17:49:11] DEBUG [#rotrw123] C: MAIL FROM:test@test.com [2019-01-31 17:49:11] DEBUG [#rotrw123] S: 250 Accepted [2019-01-31 17:49:11] DEBUG [#rotrw123] C: RCPT TO:recipient@test.com [2019-01-31 17:49:11] DEBUG [#rotrw123] S: 250 Accepted [2019-01-31 17:49:11] DEBUG [#rotrw123] C: RCPT TO:thebccperson@test.com [2019-01-31 17:49:11] DEBUG [#rotrw123] S: 250 Accepted [2019-01-31 17:49:11] DEBUG [#rotrw123] C: RCPT TO:anotherbccperson@test.com [2019-01-31 17:49:11] DEBUG [#rotrw123] S: 250 Accepted [2019-01-31 17:49:11] DEBUG [#rotrw123] C: RCPT TO:robert@test.com [2019-01-31 17:49:11] DEBUG [#rotrw123] S: 250 Accepted [2019-01-31 17:49:11] DEBUG [#rotrw123] C: RCPT TO:john@test.com [2019-01-31 17:49:11] DEBUG [#rotrw123] S: 250 Accepted

o4oren commented 5 years ago

Thanks, I will fix it.

JHuertasDev commented 4 years ago

Any new about this ?

poliva-optionti commented 4 years ago

Hi @o4oren any news on this?

andris9 commented 4 years ago

Bcc addresses only appear in the transport envelope (that is RCPT TO) and not in the message header. That’s the whole point of Bcc, otherwise other receipients would see the Bcc’s as well.

poliva-optionti commented 4 years ago

Understood!, do you know any way to recognize what addresses belong to a Bcc in the "rcpt to" array?

image

TheArKaID commented 3 years ago

Understood!, do you know any way to recognize what addresses belong to a Bcc in the "rcpt to" array?

image

Have you found the way ?