PHP mail() not working in Cyberpanel


nameservers -,,,

DNS records in domain dns manager - A - - CNAME -


Hostname -
Ubuntu 22.04 with Cyberpanel



Logs → Server Mail

Mailer - Default


PHP mail() not working | Postfix On

Kindly help me php mail() work

Note: I do not want to use SMTP


Have you installed the modules required as they are not pre installed?

Here is the tutorial and see the comments i made in there as i was also installing php mail on ubuntu

1 Like

Hi, Thank you for your reply. I am using PHP 8.1 for which all 25 extensions are installed


Php mail is not part of the 25 installable extensions within cyberpanel, you have to manually install it following the tutorial in the last post

1 Like


Done following things on ssh

cd /usr/local/lsws/lsphp81/bin

wget Source of ', htmlspecialchars($_GET['viewsource']), '

./lsphp go-pear.phar

/usr/local/lsws/lsphp81/bin/pear install mail mail_mime mail_mimedecode

install ok: channel://
install ok: channel://
install ok: channel://

systemctl restart lsws

php restarted from cyberpanel

But only previous 25 extensions still showing in cyberpanel php extensions install section


Thats right, they do not show up as extensions in cyberpanel, you have to create an info.php file to check they have installed, also there is another command you have not run for the install, check the end part of the tutorial just below how to create the info.php