You are here

function phpmailer_form_alter in PHPMailer 6

Same name and namespace in other branches
  1. 5.2 phpmailer.module \phpmailer_form_alter()

Implementation of hook_form_alter().

File

./phpmailer.module, line 40
This module integrates PHPMailer with Drupal, both as native drupal_mail() wrapper, and as part of the Mime Mail module.

Code

function phpmailer_form_alter(&$form, &$form_state, $form_id) {

  // Hide the mimemail global enabler setting if phpmailer is used to deliver
  // all e-mails (they can't be both active).
  if ($form_id == 'mimemail_settings' && strpos(variable_get('smtp_library', ''), 'phpmailer')) {
    $form['mimemail']['mimemail_alter'] = array(
      '#type' => 'value',
      '#value' => 0,
    );
  }
}