'Mail', 'description' => 'Provides support for using an external SMTP server', 'version' => '1.0.1', 'dependencies' => array(), 'developer' => 'OpenConf' ); // PHPMailer plugin directory if (!defined('MOD_MAIL_PHPMAILER_DIR')) { define('MOD_MAIL_PHPMAILER_DIR', OCC_PLUGINS_DIR . 'PHPMailer/'); } // PHPMailer loader $GLOBALS['mod_mail_phpmailer'] = false; $GLOBALS['mod_mail_debug'] = 0; if ($OC_configAR['MOD_MAIL_mailer'] == 'smtp') { if (is_file(MOD_MAIL_PHPMAILER_DIR . 'src/PHPMailer.php')) { // >= 6 require_once MOD_MAIL_PHPMAILER_DIR . 'src/PHPMailer.php'; require_once MOD_MAIL_PHPMAILER_DIR . 'src/Exception.php'; require_once MOD_MAIL_PHPMAILER_DIR . 'src/SMTP.php'; } elseif (is_file(MOD_MAIL_PHPMAILER_DIR . 'PHPMailer.php')) { // >= 6 (no src/) require_once MOD_MAIL_PHPMAILER_DIR . 'PHPMailer.php'; require_once MOD_MAIL_PHPMAILER_DIR . 'Exception.php'; require_once MOD_MAIL_PHPMAILER_DIR . 'SMTP.php'; } elseif (is_file(MOD_MAIL_PHPMAILER_DIR . 'PHPMailerAutoload.php')) { // <= 5.2 | comment out use statements above require_once MOD_MAIL_PHPMAILER_DIR . 'PHPMailerAutoload.php'; } else { err('Mail SMTP set, however plugin not found; see Mail module info page for requirements'); } $GLOBALS['mod_mail_phpmailer'] = new PHPMailer; }