Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.12.1

Bug #17122 Trying to send multiple recipients mail...
Submitted: 2010-02-16 22:58 UTC
From: dadodado79 Assigned: jon
Status: No Feedback Package: Net_SMTP (version 1.4.1)
PHP Version: 5.2.1 OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 43 + 28 = ?

 
 [2010-02-16 22:58 UTC] dadodado79 (Edoardo Dado)
Description: ------------ $recipient=array(); $q="SELECT * from addresses"; $query = mysql_query("$q"); while($dati = @mysql_fetch_array($query)){ if(eregi("^[_a-z0-9+-]+(\.[_a-z0-9+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$",$dati[email])) { if(!in_array($dati[email],$recipient)) {$recipient[]="$dati[email]";} } } include("Mail.php"); require_once ("Mail/mime.php"); $sender = "me@mail.com"; $subject = "Title"; $headers = array( 'Date'=> date("r"), 'From'=>$sender, 'Ccn'=>$recipient, 'Return-Path'=>$sender, 'Subject'=>$subject ); $crlf = "\n"; $mime = new Mail_mime($crlf); $mime->setHTMLBody($testohtml); $message = $mime->get(); $headers = $mime->headers($headers); $smtpinfo["host"] = "mysmtp.smtp.com"; $smtpinfo["port"] = "25"; $smtpinfo["auth"] = true; $smtpinfo["username"] = "myusername"; $smtpinfo["password"] = "password"; $mail =& Mail::factory("smtp", $smtpinfo); if(PEAR::isError($mail)) {die('Could not create mailer: ' . $mail->getMessage());} $error = $mail->send($recipient, $headers, $message); if(PEAR::isError($error)) {die('Failed to send email: ' . $error->getMessage());} Test script: --------------- It works with less then 20 addresses, with more it freeze Expected result: ---------------- Sending mails Actual result: -------------- With more then 20 addresses in the recipient array it doesn't work

Comments

 [2010-02-18 09:06 UTC] jon (Jon Parise)
-Status: Open +Status: Feedback -Assigned To: +Assigned To: jon
Have you ruled out the possibility that the remote SMTP server is rejecting the message submission? What is the failure message and/or code returned by the Net_SMTP library? Have you tried enabling debug output (http://www.indelible.org/php/Net_SMTP/guide.html#debugging)?
 [2010-10-21 20:57 UTC] jon (Jon Parise)
-Status: Feedback +Status: No Feedback
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you.