function phpmailer_library_exists in PHPMailer 7.4
Same name and namespace in other branches
- 7.3 phpmailer.module \phpmailer_library_exists()
Verify that PHPMailer libraries exist.
2 calls to phpmailer_library_exists()
- phpmailer_mailengine in ./
phpmailer.module - Implements hook_mailengine().
- phpmailer_requirements in ./
phpmailer.install - Implements hook_requirements().
File
- ./
phpmailer.module, line 197 - Integrates the PHPMailer library for SMTP e-mail delivery.
Code
function phpmailer_library_exists() {
$library_path = libraries_get_path('phpmailer');
if (!$library_path) {
return FALSE;
}
foreach (array(
'class.phpmailer.php',
'class.smtp.php',
) as $filename) {
if (!file_exists(DRUPAL_ROOT . '/' . $library_path . '/' . $filename)) {
return FALSE;
}
}
return TRUE;
}