dennismonsewicz Posted December 10, 2009 Share Posted December 10, 2009 So I am trying to explore the avenue known as PEAR and I am getting nowhere Here is my code: require '/usr/share/php/Mail.php'; $recipients = '[email protected]'; $headers['From'] = '[email protected]'; $headers['To'] = '[email protected]'; $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); If I do not include the file using an absolute path I get the following error message: Fatal Error: 'PEAR.php' is not a valid path But if I include the file with the absolute path I then get a blank page.... Any ideas? Link to comment https://forums.phpfreaks.com/topic/184698-pear-sendmail-problems/ Share on other sites More sharing options...
will35010 Posted December 10, 2009 Share Posted December 10, 2009 Have you turned error reporting on in your script? Link to comment https://forums.phpfreaks.com/topic/184698-pear-sendmail-problems/#findComment-975076 Share on other sites More sharing options...
dennismonsewicz Posted December 10, 2009 Author Share Posted December 10, 2009 yes Link to comment https://forums.phpfreaks.com/topic/184698-pear-sendmail-problems/#findComment-975081 Share on other sites More sharing options...
dennismonsewicz Posted December 10, 2009 Author Share Posted December 10, 2009 ok so now I am getting the following error: Fatal Error: 'send' is an unknown method of 0 updated code: require 'Mail.php'; $recipients = '[email protected]'; $headers['From'] = '[email protected]'; $headers['To'] = '[email protected]'; $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); Link to comment https://forums.phpfreaks.com/topic/184698-pear-sendmail-problems/#findComment-975099 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.