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 = 'dennismonsewicz@gmail.com'; $headers['From'] = 'me@me.com'; $headers['To'] = 'dennismonsewicz@gmail.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); 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? Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted December 10, 2009 Author Share Posted December 10, 2009 yes Quote Link to comment 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 = 'dennismonsewicz@gmail.com'; $headers['From'] = 'dennismonsewicz@gmail.com'; $headers['To'] = 'dennismonsewicz@gmail.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); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.