ryy705 Posted July 24, 2008 Share Posted July 24, 2008 Hello, In a spam message I always see my own email address in the to: field. How do they do that? They must use the bcc: field to send out the emails. So why do I see my own email address in the to: field? I would like to create the same effect for the subscribers of my website. Many thanks in advance. Link to comment https://forums.phpfreaks.com/topic/116489-how-use-the-bcc-field/ Share on other sites More sharing options...
Wuhtzu Posted July 24, 2008 Share Posted July 24, 2008 What do you mean "They must use the bcc: field to send out the emails."? If I understand you correctly you want to send out mail to all subscribers once a week or so and you want the users e-mail to appear in the to: field to make the e-mail appear personal. You simply call the mail() function as many times as you have subscribers and put their e-mail in the to: field: http://dk2.php.net/manual/en/function.mail.php <?php $emails = array('[email protected]', '[email protected]', '[email protected]'); foreach($emails as $to) { mail($to, $subject, $message); } ?> but maybe I have misunderstood your question? Link to comment https://forums.phpfreaks.com/topic/116489-how-use-the-bcc-field/#findComment-599030 Share on other sites More sharing options...
ryy705 Posted July 25, 2008 Author Share Posted July 25, 2008 Is that the only way of doing it? Won't that tax the server too much? Link to comment https://forums.phpfreaks.com/topic/116489-how-use-the-bcc-field/#findComment-599120 Share on other sites More sharing options...
Wuhtzu Posted July 25, 2008 Share Posted July 25, 2008 If you want your subscribers to receive an e-mail message with their own e-mail address in the to: field your mail server have to send 1 message per subscriber. So as far as I know the following would stress the mail server roughly the same: #1 to: [email protected], [email protected], [email protected] #2: to: [email protected] bcc: [email protected], [email protected] #3: to: [email protected] to: [email protected] to: [email protected] So even if you save some time and resources in your php script you would stress your mail server the same amount and get a poorer result... if my "theory" holds true All mailing list scripts I've seen uses a loop at some point. But I would love to hear others (maybe a mail server admin ) opinion on the matter. Link to comment https://forums.phpfreaks.com/topic/116489-how-use-the-bcc-field/#findComment-599222 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.