Commit b525ff94 authored by anrikun's avatar anrikun Committed by sun

- #2238623 by anrikun: Add support for the Mail System module.

parent 96f7aa76
......@@ -91,3 +91,12 @@ function phpmailer_update_7000() {
variable_del('smtp_library');
}
}
/**
* Add support for the Mail System module.
*/
function phpmailer_update_7001() {
if (module_exists('mailsystem')) {
mailsystem_set(array('phpmailer' => 'DrupalPHPMailer'));
}
}
......@@ -177,6 +177,10 @@ function phpmailer_enable() {
$t = get_t();
drupal_set_message($t('PHPMailer has been installed, but is currently disabled. <a href="@settings-url">Configure it now</a>.', array('@settings-url' => url('admin/config/system/phpmailer'))));
}
if (module_exists('mailsystem')) {
mailsystem_set(array('phpmailer' => 'DrupalPHPMailer'));
}
}
/**
......@@ -205,6 +209,10 @@ function phpmailer_disable() {
variable_del('mimemail_engine');
drupal_set_message(t('MimeMail e-mail engine has been reset to default.'), 'warning');
}
if (module_exists('mailsystem')) {
mailsystem_clear(array('phpmailer' => 'DrupalPHPMailer'));
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment