I just took a look after how to send mail via google smtp.
PEAR appeared as the appropriate library to do the job.
In this code snippet there is a
require_once "Mail.php";
Where does this file resides? Does __autoload() function make some trick? If i change it to fit my classes’ folder path I might broke the magic?
Please get in the habit of checking the manual before asking questions like this here. It covers this:
__autoload()is a separate concept fromincludeand/orrequire. It is a function which is automatically called when you try to use a class which has not yet been defined. It is a function you write yourself, to define your own algorithm for determining what files you need toinclude, based on your project’s file structure.You should also avoid using
__autoload()in your code, since there can be only one__autoload()function defined. Instead, you should usespl_autoload_register()instead. This function takes the name of other functions and adds it to a list of functions that, when an unknown class is invoked, will each be called until one of them finds the file which defines the class you’re looking for.