Thursday , 1 September 2016

It's new!!!

How to install php-pear mail on CentOS or RHEL

PEAR – PHP Extension and Application Repository, PEAR is a framework and distribution system for reusable PHP components.
The mail() function is using for sending emails from a php script. This is the most simplest way to send emails from a server and also its not secure process.

The mail sending scripts will shows some errors/warning while sending emails due to the absence of mail function[mail()].

Step 1: Check PhPear is already installed or not

[[email protected]]# rpm -qa|grep php-pear
[[email protected]]#

If it is not installed on the server, please install it by executing the foillowing command from the command line;

[[email protected]]# yum install php-pear
[[email protected]]# rpm -qa|grep php-pear

Step 2: Install Php-mail extension by executing the following command;

[[email protected]]# pear install Mail

Step 3: Restart webserver

[[email protected]]# service httpd restart

That’s it.. 🙂


  1. Thanks, Arun!

  2. Its works! Thanks you.

Leave a Reply

Your email address will not be published. Required fields are marked *