function messaging_phpmailer_requirements in Messaging 6
Same name and namespace in other branches
- 5 messaging_phpmailer/messaging_phpmailer.install \messaging_phpmailer_requirements()
- 6.4 messaging_phpmailer/messaging_phpmailer.install \messaging_phpmailer_requirements()
- 6.2 messaging_phpmailer/messaging_phpmailer.install \messaging_phpmailer_requirements()
- 6.3 messaging_phpmailer/messaging_phpmailer.install \messaging_phpmailer_requirements()
Implementation of hook_requirements().
File
- messaging_phpmailer/
messaging_phpmailer.install, line 26
Code
function messaging_phpmailer_requirements($phase) {
$requirements = array();
// Ensure translations don't break at install time.
$t = get_t();
if ($phase == 'runtime') {
$path = drupal_get_path('module', 'messaging_phpmailer') . '/PHPMailer';
if (!file_exists($path . '/class.phpmailer.php')) {
$requirements['messaging_hmtl_mail'] = array(
'title' => $t('Messaging PHPMailer'),
'value' => $t('PHP Mailer missing'),
'severity' => REQUIREMENT_ERROR,
'description' => $t('HTML Mail requires the <a href="http://phpmailer.codeworxtech.com/">PHP Mailer</a> class to properly send HTML Mail. Please download the 2.0 version and place the phpmailer folder in your messaging_phpmailer module directory. Rename the folder to "PHPMailer".'),
);
}
}
return $requirements;
}