Problems configuring email on cPanel
I performed a cPanel to cPanel copy of my website. Everything is now working except for the email.
I am getting the following error:
Warning: include_once(Net/SMTP.php): failed to open stream: No such file or directory in /opt/cpanel/ea-php56/root/usr/share/pear/Mail/smtp.php on line 365
Warning: include_once(): Failed opening 'Net/SMTP.php' for inclusion (include_path='.:/opt/cpanel/ea-php56/root/usr/share/pear') in /opt/cpanel/ea-php56/root/usr/share/pear/Mail/smtp.php on line 365
Fatal error: Class 'Net_SMTP' not found in /opt/cpanel/ea-php56/root/usr/share/pear/Mail/smtp.php on line 366
Here is an except of my configuration:
require_once "Mail.php";
$host = "example.com";
$port = "25";
$username = "info@example.com";
1 Reply
This looks like you will need to reinstall PEAR to fix a broken dependency.
According the this article the following steps resolved a similar problem:
pear upgrade --force --alldeps http://pear.php.net/get/PEAR-1.10.1
pear clear-cache
pear update-channels
pear upgrade
pear upgrade-all
pear install Auth_SASL
pear install pear/Net_SMTP
Please note: You may wish to backup your server before trying random configuration changes.
I would would suggest trying the last step pear install pear/Net_SMTP
first on its own to see if it able to fix your specific issue.
As an alternative, you may wish to look for the cPanel module that does this and remove and reinstall it from the cPanel interface in case there was some bit of configuration that it missed when doing the cPanel to cPanel copy.