PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Mail » Mail » Bug #9810

call to sanitizeHeaders fails

Details

Submitted2007-01-12 12:28 UTC
Fromarchie at seek dot net
Assignedchagenbu
StatusBogus
PackageMail
PHP Version5.1.6
OSWin32?
Roadmaps(Not assigned)

Comments

[2007-01-12 12:28 UTC] archie at seek dot net

Description:
------------
Following PEAR setup... (php 5.1.6)

PACKAGE VERSION STATE
Archive_Tar 1.3.1 stable
Console_Getopt 1.2 stable
Mail 1.1.14 stable
Net_SMTP 1.2.8 stable
Net_Socket 1.0.6 stable
PEAR 1.4.11 stable

Call to undefined function "_sanitizeHeaders"...

If line 247 in Mail/smtp.php is commented out, everything works fine.

Test script:
---------------
<?php
require_once 'Mail.php';
$params = array('host'=>'mail.worksfine.net','port'=>'25');
$mail = Mail::factory( "smtp",$params );
if(!is_a($mail,"PEAR_Error")) {
//the following arguments are valid
$headers = array('From'=>'me@worksfine.net','Subject'=>'Bad sanitizeHeaders');
$body = "Blargle Argle Bort";
$ret = $mail->send( "me@worksfine.net", $headers, $body );
if(is_a($ret,"PEAR_Error")) {
echo $ret->getMessage();
}else{
echo "Fine.";
}
}
?>

Expected result:
----------------
Fine.

Actual result:
--------------
Fatal error: Call to undefined method Mail_smtp::_sanitizeHeaders() in C:\php5\pear\Mail\smtp.php on line 247

[2007-02-01 17:27 UTC] chagenbu at php dot net

Sorry, but your problem does not imply a bug in PEAR itself. For a
list of more appropriate places to ask for help using PEAR, please
visit http://pear.php.net/support/ as this bug system is not the
appropriate forum for asking support questions.

Thank you for your interest in PEAR.

You have an old version of Mail.php somewhere in your include_path that's being picked up instead of the current one.