Re: PEAR mail problem

From: Date: Tue, 11 Mar 2008 23:22:21 +0000
Subject: Re: PEAR mail problem
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-28629@lists.php.net to get a copy of this message
Hey David et all, I tried what you stated, but I get the same results: Fatal error: Call to undefined method PEAR_Error::send()... <?php include("functions.php"); require_once "Mail.php"; if(isset($_POST['submitButton'])) { $allow = processForm(); if($allow) processEmail(); } function processEmail() { $from = "Webmaster <paulsingh10 <at> hotmail.com>"; $to = "<paulsingh10 <at> 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 !PEAR::isError($smtp) or die($smtp->getMessage()); }

« previous php.pear.general (#28629) next »