I want to send e-mail with smtp send function in php. So that ı should install pear email packages.But When I install these packages on terminal I get an error.The error is about extracting .tar.gz file.The tar.gz file isn't extracted.For example ı entered "sudo pear install mail" on terminal. The error is occurred as below.
could not extract the package.xml file from "/tmp/pear/install/Mail-1.2.0.tgz"
Download of "pear/mail" succeeded, but it is not a valid package archive
Error: cannot download "pear/Mail"
Download failed
install failedAnd then ı entered "sudo pear install Mail_Mime" on terminal. Again same error is occurred as below.
downloading Mail_Mime-1.8.9.tgz ...
Starting to download Mail_Mime-1.8.9.tgz (33,796 bytes)
.........done: 33,796 bytes
could not extract the package.xml file from "/tmp/pear/install/Mail_Mime-1.8.9.tgz"
Download of "pear/Mail_Mime" succeeded, but it is not a valid package archive
Error: cannot download "pear/Mail_Mime"
Download failed
install failed$mail = @$smtp->send(.. , .., ..); function doesn't work. So that mail isn't sended.This send() function worked with 1.9.4 version of pear, 5.3.10 version of php and ubuntu 12.04. But it doesn't work with 1.9.4 version of pear,5.5.9 php and ubuntu 14.04.
I added "sendmail_path" part to php.ini file.But again I couldn't install pear mail packages on terminal.
21 Answer
You can install PEAR package easily with
sudo apt-get install debpear