Jump to content

Archived

This topic is now archived and is closed to further replies.

owner

PEAR Mail installation [not sure where this goes?]

Recommended Posts

Hello,

 

I am trying to install some of the PEAR mail packages but am not having much luck.

 

First I installed pear and have configured it.  I followed: http://pear.php.net/manual/en/installation.checking.php

 

and I get bool(true) when running the test to check if pear is installed correctly.

 

Now when I try to use this sample php script:

 <?php
include('Mail.php');

$recipients = 'joe@example.com';

$headers['From']    = 'richard@example.com';
$headers['To']      = 'joe@example.com';
$headers['Subject'] = 'Test message';

$body = 'Test message';

$params['sendmail_path'] = '/usr/lib/sendmail';

// Create the mail object using the Mail::factory method
$mail_object =& Mail::factory('sendmail', $params);

$mail_object->send($recipients, $headers, $body);
?> 

 

I get these errors:

Warning: Mail_smtp::include_once(Net/SMTP.php) [mail-smtp.include-once]: failed to open stream: No such file or directory in /var/www/************/******/testMail/Mail/smtp.php  on line 348

Warning: Mail_smtp::include_once() [function.include]: Failed opening 'Net/SMTP.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/************/******/testMail/Mail/smtp.php on line 348

Fatal error: Class 'Net_SMTP' not found in /var/www/************/******/testMail/Mail/smtp.php on line 349

 

If I download the pear package manually and throw the files in the same directory(the testMail directory), I get the same errors as well.  Here is a list of the pear packages it says I have installed.

# pear list

Installed packages, channel pear.php.net:

=========================================

Package          Version State

Archive_Tar      1.3.6  stable

Console_Getopt  1.2.3  stable

Mail            1.2.0  stable

Mail_Mime        1.7.0  stable

Net_NNTP        1.5.0a1 alpha

PEAR            1.9.0  stable

Structures_Graph 1.0.3  stable

XML_Util        1.2.1  stable

 

I am trying to install these on Debian Lenny.

 

Thanks,

owner

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.