php ile bir süre içinde çok sayıda e-postalar göndermek için nasıl

3 Cevap

i want know how i can send one mail to 200 user and i want when the email sendt it appeare send to:user@mail.com from:my mail

because i think i see many email like that to:email1@exaple.com;email2@exaple.com;emial3@exaple.com; ithink this from bbc

i her kullanıcı bu e-posta gönderilir görmek istediğiniz anlamına sadece

3 Cevap

Sen, yerli mail () işlevi kullanmak adresleri virgülle ayırın, ve ek başlıklar ile kör karbon kopyası listede hepsini koyabilirsiniz.

$to       = "jon@abc.com,sal@example.com";
$subject  = "Mini-mass Emailer";
$message  = "Hello World";
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: Your Name <me@mydomain.com>' . "\r\n";
$headers .= 'Bcc: {$to}' . "\r\n";

mail($to, $subject, $message, $headers);

Yoksa e-posta adresleri koleksiyon üzerinde yineleme ve ayrı ayrı her bir mesaj gönderebilir:

$emails = array("foo@bar.com","fizz@buzz.com");
foreach ($emails as $email) {
  $to = $email;
  $subject = "My Subject";
  $message = "Hello World";

  mail($to, $subject, $message);
}

Her kullanıcı için ayrı ayrı posta gönderebilirsiniz. Bunu iteratif Bunu yapmak için bir yardımcı araç işlevi yazabilirsiniz.

eğer kullanım posta işlevi

use bcc in header like this :

$headers .= 'Bcc: 1@example.com,2@example.com.............' . "\r\n";

u can use a class like phpmailer and use AddBCC() function