Issue :

You may get this error while trying to send mails through your PHP application

Error Fatal error: Call to undefined method PEAR

Fix :

This can be fixed by reloading the pear mail modules.

Try this:

#cd /usr/src

1. wget
2. wget
3. wget

Extract the above and copy the extracted files to /usr/local/lib/php/

#cd /usr/local/lib/php

1. mkdir Net
2. cd Net
3. cp /usr/src/Net_SMTP-1.2.10/SMTP.php .
4. cp /usr/src/Net_Socket-1.0.8/Socket.php .
5. cd ..
6. cp -avr /usr/src/Mail-1.1.14/Mail/ .
7. cp -avr /usr/src/Mail-1.1.14/Mail.php .

Contact Us On WhatsApp