function smtp_requirements in SMTP Authentication Support 6
Same name and namespace in other branches
- 8 smtp.install \smtp_requirements()
- 7.2 smtp.install \smtp_requirements()
- 7 smtp.install \smtp_requirements()
Check for the required 3rd party libaries
Parameters
phase: The phase in which hook_requirements is run. Only 'runtime' is called.
See also
File
- ./
smtp.module, line 259 - Enables Drupal to send e-mail directly to an SMTP server.
Code
function smtp_requirements($phase) {
$requirements = array();
if ($phase == 'runtime') {
drupal_load('module', 'smtp');
if (!smtp_load_library()) {
$requirements['smtp_phpmailer'] = array(
'title' => t('SMTP'),
'value' => t('PHP Mailer missing'),
'severity' => REQUIREMENT_ERROR,
'description' => t('SMTP.module requires the <a href="http://phpmailer.codeworxtech.com/">PHP Mailer</a> class to properly send Mail. Please download the 2.0 version (if using PHP4) or the 5.0 version (if using PHP5) and place the phpmailer folder in the sites/all/libraries folder and rename it to "phpmailer".'),
);
}
else {
$requirements['smtp_phpmailer'] = array(
'title' => t('SMTP'),
'value' => t('PHP Mailer Installed'),
'severity' => REQUIREMENT_OK,
);
}
}
return $requirements;
}