Bug #17122 [Fbk->NoF]: Trying to send multiple recipients mail...
| From: | jon@php.net | Date: | Thu, 21 Oct 2010 16:57:25 +0000 |
| Subject: | Bug #17122 [Fbk->NoF]: Trying to send multiple recipients mail... | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-4955@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=17122&edit=1
ID: 17122
Updated by: jon@php.net
Reported By: dado dot 79 at damicom dot com
Summary: Trying to send multiple recipients mail...
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Net_SMTP
Operating System: Linux
Package Version: 1.4.1
PHP Version: 5.2.1
Assigned To: jon
Roadmap Versions:
New Comment:
-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.
Previous Comments:
------------------------------------------------------------------------
[2010-02-18 04:06:53] jon
-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-02-16 17:58:25] dadodado79
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
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=17122&edit=1