You are here

function phpmailer_enable in PHPMailer 7.4

Same name and namespace in other branches
  1. 6.3 phpmailer.module \phpmailer_enable()
  2. 6.2 phpmailer.module \phpmailer_enable()
  3. 7.3 phpmailer.install \phpmailer_enable()

Implements hook_enable().

File

./phpmailer.install, line 63
PHPMailer installation functions.

Code

function phpmailer_enable() {
  if (!phpmailer_enabled() && !(module_exists('mimemail') && variable_get('mimemail_engine', 'mimemail') == 'phpmailer')) {
    $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',
    ));
  }
}