Jump to content
php.lv forumi

Bcc koda ievietošana e-pastā, citu saņēmēju slēpšana


Cibiņš

Recommended Posts

Pārāk ātri aizklapēju iepriekšējo topiku :D

Īsti nevaru iebraukt, kā lai noslēpj to "To:" vai parāda tikai vienu lietotāju (konkrēto e-pastu, kurš saņem to newsletteru)? It kā tak esmu ielicis to Bcc kodu..

 

$subscrquery = mysql_query("SELECT subscr_mail FROM subscribers WHERE subscr_status='1'")or die(mysql_error());
  			 $to=array();
  			 while($row = mysql_fetch_array($subscrquery)) {
  				 array_push($to, $row['subscr_mail']);
  			 }
  			 $msgheader=$stripslashed_ttl;

  			 $mailheaders  = "MIME-Version: 1.0\r\n";
  			 $mailheaders .= "Content-type: text/html; charset=UTF-8\r\n";
  			 $mailheaders .= "From: ".$sender." <".$sender.">\r\n";
  			 $mailheaders .= "Reply-To: ".$sender." <".$sender.">\r\n";
  			 $mailheaders .= "To: ".implode(',', $to)."\r\n";
  			 $mailheaders .= "Cc: ".implode(',', $to)."\r\n";
  			 $mailheaders .= "Bcc: ".implode(',', $to)."\r\n";   				 
  			 $mailmsg .= $stripslashed_news;
  			 mail(implode(',', $to), $msgheader,$mailmsg,$mailheaders);

Link to comment
Share on other sites

Aizvācu bet izmaiņas nekādas..Var redzēt bildē ka klāt ir tas To: un pievienoti divi e-pasti, tik cik ir tajā datubāzes tabulā. Nu nau ritīgi! :@

 

  		 	$subscrquery = mysql_query("SELECT subscr_mail FROM subscribers WHERE subscr_status='1'")or die(mysql_error());

  			 $to=array();
  			 while($row = mysql_fetch_array($subscrquery)) {
  				 array_push($to, $row['subscr_mail']);
  				 $mailcc=$row['subscr_mail'];
  			 }
  			 $msgheader=$stripslashed_ttl;

  			 $mailheaders  = "MIME-Version: 1.0\r\n";
  			 $mailheaders .= "Content-type: text/html; charset=UTF-8\r\n";
  			 $mailheaders .= "From: ".$sender." <".$sender.">\r\n";
  			 $mailheaders .= "Reply-To: ".$sender." <".$sender.">\r\n";
  			 $mailheaders .= "Bcc: ".implode(',', $to)."\r\n";   		 
  			 $mailmsg .= $stripslashed_news;
  			 mail(implode(',', $to), $msgheader,$mailmsg,$mailheaders);

post-3796-0-61057800-1338905412_thumb.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...