function queue_mail_requirements in Queue Mail 6
Same name and namespace in other branches
- 8 queue_mail.install \queue_mail_requirements()
- 5 queue_mail.install \queue_mail_requirements()
- 7 queue_mail.install \queue_mail_requirements()
File
- ./
queue_mail.install, line 20
Code
function queue_mail_requirements($phase) {
$req = _queue_mail_req();
$lib = variable_get(DRUPAL_SMTP_LIBRARY, '');
$our_lib = queue_mail_library_path();
if (!$lib) {
$req['queue_mail']['severity'] = REQUIREMENT_OK;
$req['queue_mail']['description'] = t('The variable "smtp_library" is not set. The queue mail will set it to "!lib" so that emails go out via job queue at cron time.', array(
'!lib' => $lib,
));
return $req;
}
if ($lib == $our_lib) {
$req['queue_mail']['severity'] = REQUIREMENT_OK;
$req['queue_mail']['description'] = t('The variable "smtp_library" is set to "!lib". This means queue mail will be the one sending emails out via job queue at cron time.', array(
'!lib' => $lib,
));
return $req;
}
else {
$req['queue_mail']['severity'] = REQUIREMENT_ERROR;
$req['queue_mail']['description'] = t('The variable "smtp_library" is set to "!lib". This means another module is using another smtp_library. Please beware that this can cause emails not to be sent properly. Please unset the "smtp_library" manually, or disable the module that uses it, then disable and reenable this module.', array(
'!lib' => $lib,
));
return $req;
}
}