Cibiņš Posted June 5, 2012 Report Share Posted June 5, 2012 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); Quote Link to comment Share on other sites More sharing options...
rpr Posted June 5, 2012 Report Share Posted June 5, 2012 tad iznjem no to un cc, ja ir bcc. Quote Link to comment Share on other sites More sharing options...
Cibiņš Posted June 5, 2012 Author Report Share Posted June 5, 2012 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); Quote Link to comment Share on other sites More sharing options...
indoom Posted June 5, 2012 Report Share Posted June 5, 2012 http://php.net/manual/en/function.mail.php Paskaties, kas ir funkcijas mail pirmais parametrs Quote Link to comment Share on other sites More sharing options...
briedis Posted June 5, 2012 Report Share Posted June 5, 2012 Nečakarējies ar mail(), un paņem normālu e-pastu bibliotēku, piemēram, PHPMailer. http://phpmailer.worxware.com/index.php?pg=sf&p=dl Paraugs: http://phpmailer.worxware.com/index.php?pg=exampleamail Quote Link to comment Share on other sites More sharing options...
daGrevis Posted June 6, 2012 Report Share Posted June 6, 2012 http://swiftmailer.org/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.