how to use php pear mail

Your error message is self-explanatory. Make sure you have PEAR::Mail installed on your machine, if not then please install it.

Linux:

pear install Mail

Windows:

http://www.geeksengine.com/article/install-pear-on-windows.html

If the process is done.

Then please include your Mail.php in your script (probably before you instantiate Mail object. This should probably kick your warnings away.

include "/path/to/pear/Mail.php";

or

set_include_path("/path/to/pear"); include "Mail.php";

Also make sure there is enough permission given for Mail.php for PHP to read.


Check if pear is installed in the system . If yes then specify path to Pear installation directory in php.ini include_path directive

You need to install PEAR and PEAR MAIL packages to get it working

Tags:

Php

Email

Pear