Author Topic: PEAR Mail installation [not sure where this goes?]  (Read 2619 times)

0 Members and 1 Guest are viewing this topic.

Offline ownerTopic starter

  • Enthusiast
  • Posts: 71
    • View Profile
PEAR Mail installation [not sure where this goes?]
« on: April 20, 2010, 09:00:49 PM »
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:
Code: [Select]
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.
Quote
# 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
« Last Edit: April 20, 2010, 09:02:07 PM by owner »

Offline ownerTopic starter

  • Enthusiast
  • Posts: 71
    • View Profile
Re: PEAR Mail installation [not sure where this goes?]
« Reply #1 on: April 20, 2010, 10:20:21 PM »
pear install Net_SMTP