PHP project in Linux could not send mail: PEAR Mail package was not installed

Source: Internet
Author: User
Tags pear rfc822

Send message Error: PEAR Mail package is not installed because PEAR mail components are missing from Linux.

The PEAR Mail component is the three major support for the PHP PEAR MAIL/SMTP software package:

1) Implementation of the NET/SMTP:SMTP protocol

2) Mail: A class that provides multiple interfaces for sending messages

3) Network/Socke: Network interface

Workaround: Download and install in PHP pear repo

1. Download the file

[[Email protected]2 ~]# CD/Tmp[[email protected]-2 tmp]# wget http://  Download.pear.php.net/package/mail-1.1.14.tgz[[email protected]-2 tmp]# wget http://  download.pear.php.net/package/net_smtp-1.2.10.tgz[[email protected]-2 tmp]# wget http://download.pear.php.net/package/net_socket-1.0.8.tgz

2. Extracting files

[Email protected]2 tmp]# tar-zxvf mail-1.1.  - . tgz [email protected]-2 tmp]# tar-zxvf net_smtp-1.2. Ten . tgz [email protected]-2 tmp]# tar-zxvf net_socket-1.0. 8 . tgz

3. installation files

[[Email protected]2tmp]# cd/usr/share/Pear[[email protected]-2pear]# mkdir net[[email protected]-2pear]# CD Net[[email protected]-2net]# cp/tmp/net_smtp-1.2.Ten/smtp.php. [[Email protected]-2net]# cp/tmp/net_socket-1.0.8/socket.php. [[Email protected]-2net]# CD. [[Email protected]-2pear]# cp-avr/tmp/mail-1.1. -/mail/. '/tmp/mail-1.1. -/mail/' and '.Mail "/tmp/mail-1.1. -/mail/NULL. php '-/mail/'.NULL. php '/tmp/mail-1.1. -/mail/mail.php './mail/mail.php "/tmp/mail-1.1. -/mail/smtp.php './mail/smtp.php "/tmp/mail-1.1. -/mail/sendmail.php './mail/sendmail.php "/tmp/mail-1.1. -/mail/rfc822.php './mail/rfc822.php ' [[email protected]-2pear]# cp-avr/tmp/mail-1.1. -/mail.php. '/tmp/mail-1.1. -/mail.php './mail.php '

Then re-test in the project

Help Link:https://www.cyberciti.biz/tips/rhel-install-php-net-smtp-email-socket.html

PHP project in Linux could not send mail: PEAR Mail package was not installed

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.