at first, thanks for the class, which I have been using for a while. Right now, I have a need to send a message to recipients, which should not be visible. Typically BCC, but you say in your article, BCC should not be used. So, is there a way, how to do it using your class? Sending multiple emails to each individual recipient is not a solution for me.
Manuel Lemos - 2010-11-26 05:08:56 - In reply to message 1 from Marek Strop
Right, SMTP servers do not care what you put in the headers that you send. SMTP servers do not parse the message to extract the sender or recipient address. Those addresses are passed to the SMTP server with special commands.
So, if you want to send messages to implicit recipients, do not put the Bcc header in the message, or else the server will pass that header and will not remove it. Instead, if you use the SendMessage call, put all recipients in the second parameter, which is an array with all addresses that you put in To:, Cc:, Bcc, etc..
Anyway, I always recommend that you use the MIME message class together with the SMTP class, as it takes care of all that and many other details to compose standards compliant messages: