Install PHP Pear Mail / SMTP package on CentOS / Red Hat Enterprise Linux
Recently I've noticed that Redhat removed support for following php pear packages:
a) NET/SMTP : An implementation of the SMTP protocol
b) Mail : Class that provides multiple interfaces for sending emails
c) Net/Socke : Network Socket Interface
The simplest solution is downloading and installs these files from php pear repo.
Step # 1: Download files
Use wget command to download all files:
# cd /tmp
# wget http://download.pear.php.net/package/Mail-1.1.14.tgz
# wget http://download.pear.php.net/package/Net_SMTP-1.2.10.tgz
# http://download.pear.php.net/package/Net_Socket-1.0.8.tgz
Untar all files:
# tar -zxvf Mail-1.1.14.tgz
# tar -zxvf Net_SMTP-1.2.10.tgz
# tar -zxvf Net_Socket-1.0.8.tgz
Step # 2: Install files
Simply copy file to your webroot such as /www/usr/share/pear or standard location such as /usr/share/pear:
# cd /usr/share/pear
# mkdir Net
# cd Net
# cp /tmp/Net_SMTP-1.2.10/SMTP.php .
# cp /tmp/Net_Socket-1.0.8/Socket.php .
# cd ..
# cp -avr /tmp/Mail-1.1.14/Mail/ .
# cp -avr /tmp/Mail-1.1.14/Mail.php .
Step # 3: Test SMTP email
Now you have required files, all you have to do is send email using authenticated smtp server.
Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
You may also be interested in other helpful articles:
- Postfix masquerading or changing outgoing SMTP email or mail address
- PHP Send Email Using Authenticated SMTP Mail Server In Real Time
- Linux forwarding-ports mail traffic over ssh
- Sending email or mail with attachment from command or shell prompt
- Linux Postfix mail server SSL certificate installations and configuration
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: install_php_pear_mail, install_php_pear_smtp, mail_class, network_socket, php_pear, redhat, smtp, socket_interface




Recent Comments
Today ~ 1 Comment
Today ~ 50 Comments
Today ~ 3 Comments
Yesterday ~ 10 Comments
Yesterday ~ 8 Comments