[php-maint] Bug#407237: Recommends: php-net-smtp should be changed
to Depends:
Luis Parravicini
lparravi at gmail.com
Wed Jan 17 04:58:47 CET 2007
Package: php-mail
Version: 1.1.6-2
php-net-smtp is required to use php-mail, but it's listed as a
recommended package.
To reproduce the error, create a php file (test.php)
================================
<?php
require_once 'Mail.php';
$headers['From'] = 'sender at example.com';
$headers['To'] = 'recipient at example.com';
$headers['Subject'] = 'Los mismos de siempre';
$body = 'Adonde vas, que buscas en el frio de la noche.';
$host = "mail.example.com";
$smtp = Mail::factory('smtp', array('host' => $host));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail))
echo($mail->getMessage());
else
echo('Message sent');
?>
================================
Run it with 'php -f test.php' and it gives the following error:
================================
Warning: send(Net/SMTP.php): failed to open stream: No such file or
directory in /usr/share/php/Mail/smtp.php on line 157
Warning: send(): Failed opening 'Net/SMTP.php' for inclusion
(include_path='.:/usr/share/php:/usr/share/pear') in
/usr/share/php/Mail/smtp.php on line 157
Fatal error: Cannot instantiate non-existent class: net_smtp in
/usr/share/php/Mail/smtp.php on line 159
================================
After installing php-net-smtp, the script runs without errors.
More information about the pkg-php-maint
mailing list