Sunday 7 February 2016

Installing PHP Pear Packages & Mail in Linux

In Linux we can setup Pear Packages & can directly send mail via SMTP & IMAP protocols.
First I will explain how to install Pear Packages in Linux.
Open Terminal, then type the following lines;-

sudo apt-get install php-pear
sudo pear install mail
sudo pear install Net_SMTP
sudo pear install Auth_SASL
sudo pear install mail_mime

Actually this will only download the required packages & store in a folder. So we have to execute it by typing the code below.

sudo gunzip /build/php5-0LI9sl/php5-5.5.9+dfsg/pear-build-download/*.tar
sudo pear upgrade /build/php5-0LI9sl/php5-5.5.9+dfsg/pear-build-download/*.tar

Here Location will be different for different installation, so you just replace the location depend on your installation
Now just restart the apache server
sudo service apache2 restart

Next step is to install Imap package.Type below in the terminal
sudo apt-get install php5-imap
sudo php5enmod imap
sudo service apache2 restart

Now check..everything will work Perfectly..

No comments:

Post a Comment