You are here

function phpmailer_active in PHPMailer 8.3

Determine if PHPMailer is used to deliver e-mails.

4 calls to phpmailer_active()
phpmailer_form_mimemail_admin_settings_alter in ./phpmailer.module
Implementation of hook_form_FORM_ID_alter().
phpmailer_install in ./phpmailer.install
Implementation of hook_install().
phpmailer_uninstall in ./phpmailer.install
Implementation of hook_uninstall().
SettingsForm::submitForm in src/Form/SettingsForm.php
Form submission handler.

File

./phpmailer.module, line 89
Integrates the PHPMailer library for SMTP e-mail delivery.

Code

function phpmailer_active() {

  // We need to rely on our 'smtp_on' variable, since PHPMailer may not be
  // configured as the default mail system.
  return (bool) \Drupal::config('phpmailer.settings')
    ->get('smtp_on');
}