Skip to content
Snippets Groups Projects
Commit b525ff94 authored by Henri MEDOT's avatar Henri MEDOT Committed by Daniel Kudwien
Browse files

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

parent 96f7aa76
No related branches found
No related tags found
No related merge requests found
...@@ -91,3 +91,12 @@ function phpmailer_update_7000() { ...@@ -91,3 +91,12 @@ function phpmailer_update_7000() {
variable_del('smtp_library'); 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() { ...@@ -177,6 +177,10 @@ function phpmailer_enable() {
$t = get_t(); $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')))); 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() { ...@@ -205,6 +209,10 @@ function phpmailer_disable() {
variable_del('mimemail_engine'); variable_del('mimemail_engine');
drupal_set_message(t('MimeMail e-mail engine has been reset to default.'), 'warning'); drupal_set_message(t('MimeMail e-mail engine has been reset to default.'), 'warning');
} }
if (module_exists('mailsystem')) {
mailsystem_clear(array('phpmailer' => 'DrupalPHPMailer'));
}
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment