Errors with cPanel Pear Mail: Could not open stream

I installed Pear using the cPanel installer and installed the Mail package (which also automatically installed the Net_Mail and Net_Socket packages). However, from my PHP file in which I am sending an email, I get the following error:

Warning: include_once (Net / SMTP.php) [function.include-once]: open stream failed: no such file or directory in / usr / local / lib / php / Mail / smtp.php on line 348

Warning: include_once () [function.include]: Failure to open "Net / SMTP.php" to enable (Include_path = ': / USR / Library / PHP: / USR / local / Library / PHP') in / usr / local / lib / php / mail / smtp.php on line 348

Fatal error : class 'Net_SMTP' not found in /usr/local/lib/php/Mail/smtp.php on line 349

Now I checked the included paths, and they all check perfectly and are in the appropriate places and have the appropriate permissions.

How to fix this error?

For reference: directory structure (excluding other folders):

php
|-Mail
| |-mail.php
| |-mock.php
| |-null.php
| |-RFC822.php
| |-sendmail.php
| |-smtp.php
| |-smtpmx.php
|-Net
| |-SMTP.php
| |-Socket.php
|- Mail.php
+3
source share
1 answer

If you have access to ssh, you can try:

pear install Net_SMTP
+6
source

All Articles