Hi, i want to send use the mail() function to send to 10 people at once, however I only want only the receiver to be able to see their email address in to the "to" field instead of all 10. How do I do this? Thanks
The correct section is BCC. BCC, refers to the practice of sending a message to multiple recipients in such a way that what they receive does not contain the complete list of recipients.
Yes, I use bcc, but what to I put for the to field? If I leave it blank, than it still goes out but when I receive it, there is no to field. Which looks weird and may have some issues with some email providers.
What's wrong with the handy for loop? Since you know the number of emails to send, use a for loop.. psuedocode incoming:- $newRecipient := Array of Email Addresses; for($x=0; $x<=10; $x++) mail($newRecipient[x], .., .., ..); Code (markup):
I guess BCC is good, but can't programs like Outlook etc view the BCC addresses too? Personally, if you're that concerned with privacy, I'd go with the loop were you know that there's no way of the addresses being leaked.
Looping makes the email look more personal. Otherwise you can use the BCC field and create a fake to field (e.g., an email address at your domain that auto-deletes incoming email called "Secure Recipients"). Assuming your mail binary is set up correctly, the BCC field would not show up in the header.