Re: Mail - only send to Bcc
| From: | Dan Rossi | Date: | Fri, 22 Apr 2005 11:43:31 +0000 |
| Subject: | Re: Mail - only send to Bcc | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-18913@lists.php.net to get a copy of this message | ||
Umm you might want to check out Mail_Queue or better still mailman which is running the php lists ??
On 22/04/2005, at 9:28 PM, Alexander Petri wrote:
thx now it works.... return $mail->send(null, $hdrs, $body); was the key now i make some mass mailing tests with around 2000 mails. it works great. i can run the test in one script at once. but get the mail in my outlook takes about 2hours. "Dan Rossi" <pear@electroteque.org> schrieb im Newsbeitrag news:63250e61bc976db470d89e8b2362f75b@electroteque.org...try sending it to yourself in the to header ? On 22/04/2005, at 8:46 PM, Alexander Petri wrote:-- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpHi i tried the following code send mails only toBccs but they are all in the 'To' header how could i set them in 'Bcc' ? what about "nonworking" emailadresses in a large array are there any expiriences here is my code: define(LANG,"de"); require_once '../ini/config.php'; $headers['Subject'] = "Text in der Betreffzeile"; $headers['From'] = "info@my-domain.de"; $headers['Bcc'] = array( "jon.doe@gmx.de","test@test.de", "de@de.de", "bla@blubb.com");// text $text = "asdasd asdasd adsasd \n"; $text.= "Link klicken: \n\n"; $text.= 'http://www.gmx.de'; if(sendMail($text,$headers)){ echo "Mailing hat geklappt"; }else{ echo "Mailing fehlgeschlagen"; } // sendmail fkt function sendMail($text,$hdrs,$crlf="\n"){ require_once('Mail.php'); require_once('Mail/mime.php'); $html = parseHtml($text); $mime = new Mail_mime($crlf); $mime->setTXTBody($text); $mime->setHTMLBody($html); $body = $mime->get(); $hdrs = $mime->headers($hdrs); $mail =& Mail::factory('mail'); return $mail->send($hdrs['Bcc'], $hdrs, $body); } //HTML Parse fkt function parseHtml($text){ $pre="<span style=\"font-family:Arial, Helvetica, sans-serif \">"; $suff="</span>"; $text_arr = explode (" ", $text); foreach($text_arr as $k => $v){ if(substr_count($v,"http://")==1){ $text_arr[$k]='<a href="'.$v.'" >'.$v.'</a><br>'; }else{ $text_arr[$k]=nl2br($v); } } $text = $pre.implode(" ", $text_arr).$suff; return $text; } -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php