kaz3 Posted June 12, 2009 Share Posted June 12, 2009 I am using this modified script I found to send emails from my site. function SendMail($to, $subject, $body, $from, $headers) { $headers['From'] = $from; $headers['To'] = $to; $headers['Subject'] = $subject; $params['host'] = ini_get('SMTP'); $smtp =& Mail::factory('smtp', $params); $mail = $smtp->send($to, $headers, $body); } I have tried many different versions of sending mail with many different scripts but they all end up having the same problem. I always get this error: Fatal error: Call to undefined method PEAR_Error::send() in packages.php on line 69 and line 69 is this: $mail = $smtp->send($to, $headers, $body); Does this mean I don't have PEAR installed? How do I fix it? Link to comment https://forums.phpfreaks.com/topic/161974-pear-mail/ Share on other sites More sharing options...
ldougherty Posted June 12, 2009 Share Posted June 12, 2009 Do you have access via shell? If so type in pear list and this will list all installed pear packages and their versions. Link to comment https://forums.phpfreaks.com/topic/161974-pear-mail/#findComment-854638 Share on other sites More sharing options...
kaz3 Posted June 12, 2009 Author Share Posted June 12, 2009 No I do not. Link to comment https://forums.phpfreaks.com/topic/161974-pear-mail/#findComment-854645 Share on other sites More sharing options...
kaz3 Posted June 12, 2009 Author Share Posted June 12, 2009 Have access that is. Link to comment https://forums.phpfreaks.com/topic/161974-pear-mail/#findComment-854663 Share on other sites More sharing options...
kaz3 Posted June 12, 2009 Author Share Posted June 12, 2009 Anyone? This is really the only thing I have to complete for my site. Link to comment https://forums.phpfreaks.com/topic/161974-pear-mail/#findComment-854753 Share on other sites More sharing options...
tom2oo8 Posted June 12, 2009 Share Posted June 12, 2009 Cant you just use phps mail() function? Link to comment https://forums.phpfreaks.com/topic/161974-pear-mail/#findComment-854818 Share on other sites More sharing options...
ldougherty Posted June 13, 2009 Share Posted June 13, 2009 Without shell access its rather difficult to troubleshoot. You can ask your host what the error logs state, and if there is anything in the mail log or not. If the Pear SMTP class doesn't work you can try the PHP Mailer Class http://www.hostmysite.com/support/linux/programming/phpmailer/ Link to comment https://forums.phpfreaks.com/topic/161974-pear-mail/#findComment-854835 Share on other sites More sharing options...
kaz3 Posted June 14, 2009 Author Share Posted June 14, 2009 Cant you just use phps mail() function? I have used it before and it had worked fine until the emails I sent did not show in proper format sometimes. When I sent HTML emails to a web mail account(yahoo, msn, etc), they were shown just as I wanted. But when the mail read in an application such as Outlook, it was just plain text. I figured it was the way the mail function worked. Link to comment https://forums.phpfreaks.com/topic/161974-pear-mail/#findComment-855591 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.