source: trunk/include/PHPMailerAutoload.php @ 24951

Last change on this file since 24951 was 24951, checked in by plg, 11 years ago

feature 2965: replace custom mail functions by PHPMailer (version 5.2.7).
Based on patch by msakik.

function pwg_send_mail no longer used (all is done in pwg_mail)

new param $confsmtp_secure

work still in progress, some obsolete code must be removed

File size: 1.1 KB
Line 
1<?php
2/**
3 * PHPMailer SPL autoloader.
4 * PHP Version 5.0.0
5 * @package PHPMailer
6 * @link https://github.com/PHPMailer/PHPMailer/
7 * @author Marcus Bointon (coolbru) <phpmailer@synchromedia.co.uk>
8 * @author Jim Jagielski (jimjag) <jimjag@gmail.com>
9 * @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
10 * @author Brent R. Matzelle (original founder)
11 * @copyright 2013 Marcus Bointon
12 * @copyright 2010 - 2012 Jim Jagielski
13 * @copyright 2004 - 2009 Andy Prevost
14 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
15 * @note This program is distributed in the hope that it will be useful - WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE.
18 */
19
20/**
21 * PHPMailer SPL autoloader.
22 * @param string $classname The name of the class to load
23 */
24function PHPMailerAutoload($classname)
25{
26    //Can't use __DIR__ as it's only in PHP 5.3+
27    $filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php';
28    if (is_readable($filename)) {
29        require $filename;
30    }
31}
32
33spl_autoload_register('PHPMailerAutoload');
Note: See TracBrowser for help on using the repository browser.