zabszk / CSharp-SMTP-Server

SMTP Server in C#
MIT License
16 stars 4 forks source link

Email messages missing CC addresses. #2

Closed alexhiggins732 closed 2 years ago

alexhiggins732 commented 4 years ago

The IMessageTransaction interface and implementations do not implement CC and the underlying server code does not parse the CC addresses of the email. Instead the address are added to the To address collection.

zabszk commented 2 years ago

Hi.

Sorry for the quite long delay. I'm working on headers parsing now. However keep in mind that emails addresses set in headers are NOT the ones where email should be delivered.

To, CC and BCC headers are ONLY for the mail client/web client, NOT for the SMTP server itself. These headers are OPTIONAL and doesn't need to match the real addresses of recipients. They are only for the mail client, not mail server.

SMTP server delivers based on RCPT TO command and that command does not support CC and BCC, because it doesn't make any difference for the SMTP server and it's not visible for the mail client.

More details can be found here: https://gist.github.com/nestoru/04e86119b80ec501a31d