You are here

function phpmailer_load_library in PHPMailer 6.3

Load PHPMailer class from libraries path.

3 calls to phpmailer_load_library()
mimemail_phpmailer_send in includes/phpmailer.mimemail.inc
Send out an e-mail.
phpmailer_requirements in ./phpmailer.install
Implementation of hook_requirements().
phpmailer_send in includes/phpmailer.drupal.inc
Send out an e-mail.

File

./phpmailer.module, line 199
Integrates the PHPMailer library for SMTP e-mail delivery.

Code

function phpmailer_load_library() {
  if (!class_exists('PHPMailer')) {
    if (!($library_path = phpmailer_get_path())) {
      watchdog('phpmailer', 'Could not load PHPMailer library.', array(), WATCHDOG_ERROR);
      return FALSE;
    }
    require_once './' . $library_path . '/class.phpmailer.php';
  }
  if (!class_exists('DrupalPHPMailer')) {
    module_load_include('inc', 'phpmailer', 'includes/phpmailer.class');
  }
  return TRUE;
}