PEAR mail problem
| From: | paul singh | Date: | Fri, 07 Mar 2008 03:22:24 +0000 |
| Subject: | PEAR mail problem | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-28607@lists.php.net to get a copy of this message | ||
Hello,
I love this script due to it simplistic setup and I had it working on my laptop
running locally. However, I have run into some major issues when I transferred
my files, including the script, to a server. PHP 5.0 is installed on the
server, and I have been getting the following issue:
Fatal error: Call to undefined method PEAR_Error::send()
----------------------CODE-----------------
$from = "Webmaster <paulsingh10@hotmail.com>";
$to = "<paulsingh10@hotmail.com>";
$subject = "Registration Confirmation";
$body = "\n\nYour account is pending approval,
please be patient.\n\nThank you,\nPRWR Webmaster.";
$host = "ssl://smtp.gmail.com";
$port = "465";
$username = "*********";
$password = "*********";
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'port' => $port,
'auth' => true,
'username' => $username,
'password' => $password));
$mail = $smtp->send($to, $headers, $body); --LINE 35 BTW
if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {}
I believe PEAR is installed, but is this the issue why I am having problems? Do
I have to include it's path. Please I need help with this issue, it is rather
urgent.
I thank you for your time,
Paul