PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Mail » Mail_Queue » Bug #4752

sendMailsInQueue - Headers are not deserialized

Details

Submitted2005-07-05 18:50 UTC
Fromjruiz at tecsisa dot com
Assignedquipo
StatusNo Feedback
PackageMail_Queue
PHP Version4.3.7
OSSQL Server
Roadmaps(Not assigned)

Comments

[2005-07-05 18:50 UTC] jruiz at tecsisa dot com

Description:
------------
When calling sendMailsInQueue (having some mails in queue)

<b>Warning</b>: Invalid argument supplied for foreach() in <b>C:\Inetpub\php\pear\Mail.php</b> on l
ine <b>133</b><br />

That is in Mail::prepareHeaders($headers);

Doing some debug I find that db.php _preload() function is not able to deserialize "headers"... before unserialize headers is:

headers: a:10:{s:12:\"MIME-Version\";s:3:\"1.0\";s:4:\"From\";s:29:\"\"SOMETHING\" <SOME@domain.com>
\";s:2:\"To\";s:27:\"\"other\" <me@domain.com>\";s:2:\"CC\";s:27:\"\"me\" <me@domain.com>
\";s:3:\"Bcc\";s:0:\"\";s:8:\"Reply-To\";s:13:\"other@domain.com\";s:9:\"Errors-to\";s:13:\"other@domain.com\";s:8:\"X-Mailer\";s:12:\"iGW v2.3\";s:7:\"Subject\";s:45:\"SUBJECT =?ISO-8859-1?Q?N=BA0?
= junio 2005\";s:12:\"Content-Type\";s:69:\"multipart/alternative;
boundary=\"=_a576ecb69afd3dd6b0d1e7c3bc005978\"\";}

Reproduce code:
---------------
$mail_queue =& new Mail_Queue($mail_db_options, $mail_options);

$statusPut = $mail_queue->put($from_short, $to, $headers, $body,0, false );

...

$max_amount_mails = 50;

$mail_queue =& new Mail_Queue($mail_db_options, $mail_options);

$mail_queue->sendMailsInQueue($max_amount_mails, 0, 1);

Expected result:
----------------
Mail should be sent without warnings

Actual result:
--------------
<b>Warning</b>: Invalid argument supplied for foreach() in <b>C:\Inetpub\php\pear\Mail.php</b> on l
ine <b>133</b><br />