Posts Tagged ‘email’
Send emails in PHP-Using PEAR extensions II
In the previous post we looked at managing and installing PHP Extension and Application Repository (PEAR) packages, as well as how to use such a package from a PHP script. Now we will look at some of the other packages in the PEAR library.
The packages required for this column are available from www.pear.php.net.
To install them into your local PHP system, copy all packages from the PEAR site into a temporary directory, then type:
$ pear install
Where <package filename> is the filename of the package you are installing. The packages are stored in tar gzipped format, so you may get an error like this:
The extension ‘zlib’ couldn’t be found.
Send emails in PHP-Using PEAR extensions
The PHP Extension and Application Repository (PEAR) is an open source structured library of packages for PHP developers. These packages provide routines which solve problems PHP developers regularly face: sending structured e-mail (such as an HTML attachment), interacting with different databases from a single script, error handling, recovery and logging.
The base installation of PEAR is shipped with PHP itself. The programmers working on PEAR have developed a method of installing new packages and keeping your existing installation up-to-date, called the PEAR package manager.
PEAR package manager
If you are using a version of PHP prior to 4.3, you will need to install the PEAR package manager. UNIX users can run the following command:
lynx -source http://go-pear.org/ | /path/to/php
This downloads the source of the page at http://go-pear.org and runs it with the PHP binary (replace /path/to with the path to PHP on your system).