On centos/redhat :
yum install php-pear
pear install -a Mail
On debian
apt-get install php-pear
pear install -a Mail

Installation completed.