Jump to content

How use the bcc field


ryy705

Recommended Posts

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

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?

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.