Report new bug | New search | Development Roadmap Status: Open | Feedback | All

Bug #3489 Call to undefined function: send()
Submitted: 2005-02-16 04:16 UTC Modified: 2005-03-04 10:01 UTC
From: webmaster at ukrainebride dot net Assigned:
Status: Bogus Package: Documentation
PHP Version: 4.3.4 OS: FreeBSD
Roadmaps: (Not assigned)    
Subscription  


 [2005-02-16 04:16 UTC] webmaster at ukrainebride dot net
Description: ------------ When starting this example I have received the PHP error on the last row ( $mail->send(... ): Fatal error: Call to undefined function: send() in... I have used for this example the next packages: Mail-1.1.4 Mail_Mime-1.2.1 PEAR-1.3.4

Comments

 [2005-02-16 04:20 UTC] webmaster at ukrainebride dot net
full list of my code: <?php include('Mail.php'); include('Mail/mime.php'); $text = 'Text version of email'; $html = '<html><body>HTML version of email</body></html>'; $file = '/keys.txt'; $crlf = "\n"; $hdrs = array( 'From' => 'info@ukrainebride.net', 'Subject' => 'Test mime message' ); $mime = new Mail_mime($crlf); $mime->setTXTBody($text); $mime->setHTMLBody($html); $mime->addAttachment($file, 'text/plain'); $body = $mime->get(); $hdrs = $mime->headers($hdrs); $mail =& Mail::factory('mail'); $mail->send('webmaster@ukrainebride.net', $hdrs, $body); ?>
 [2005-02-24 11:27 UTC] mj
The example worked fine for me the other day. Can you please add a "var_dump($mail);" before the last line and see what the output is?
 [2005-03-04 05:09 UTC] webmaster at ukrainebride dot net
When I have added var_dump($mail) before last row of code then there was the next output: object(pear_error)(8) { ["error_message_prefix"]=> string(0) "" ["mode"]=> int(1) ["level"]=> int(1024) ["code"]=> NULL ["message"]=> string(36) "Unable to find class for driver mail" ["userinfo"]=> NULL ["backtrace"]=> array(3) { [0]=> array(6) { ["file"]=> string(56) "/usr/local/www/sites/loc/odessa-models/TESTMIME/PEAR.php" ["line"]=> int(542) ["function"]=> string(10) "pear_error" ["class"]=> string(10) "pear_error" ["type"]=> string(2) "->" ["args"]=> array(5) { [0]=> string(36) "Unable to find class for driver mail" [1]=> NULL [2]=> int(1) [3]=> int(1024) [4]=> NULL } } [1]=> array(6) { ["file"]=> string(56) "/usr/local/www/sites/loc/odessa-models/TESTMIME/Mail.php" ["line"]=> int(57) ["function"]=> string(10) "raiseerror" ["class"]=> string(4) "pear" ["type"]=> string(2) "::" ["args"]=> array(1) { [0]=> string(36) "Unable to find class for driver mail" } } [2]=> array(6) { ["file"]=> string(60) "/usr/local/www/sites/loc/odessa-models/TESTMIME/testmime.php" ["line"]=> int(24) ["function"]=> string(7) "factory" ["class"]=> string(4) "mail" ["type"]=> string(2) "::" ["args"]=> array(1) { [0]=> string(4) "mail" } } } ["callback"]=> NULL } Fatal error: Call to undefined function: send() in /usr/local/www/sites/loc/odessa-models/TESTMIME/testmime.php on line 26
 [2005-03-04 10:01 UTC] cipri
Sorry, but your problem does not imply a bug in PEAR itself. For a list of more appropriate places to ask for help using PEAR, please visit http://pear.php.net/support/ as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PEAR. The problem is that the Mail::factory function is unable to load the Mail_mail class, from Mail/mail.php. Make sure this file exists, and is readable/loadable by PHP. You might want to reinstall the Mail package, perhaps some of its files accidently got deleted on your system.