You are here

function phpmailer_settings_form_submit in PHPMailer 5.2

Same name and namespace in other branches
  1. 6.3 phpmailer.admin.inc \phpmailer_settings_form_submit()
  2. 6.2 phpmailer.admin.inc \phpmailer_settings_form_submit()
  3. 7.4 phpmailer.admin.inc \phpmailer_settings_form_submit()
  4. 7.3 phpmailer.admin.inc \phpmailer_settings_form_submit()

Form submit function.

See also

phpmailer_settings_form()

File

./phpmailer.admin.inc, line 162
Administrative functions for PHPMailer integration module.

Code

function phpmailer_settings_form_submit($form_id, $form_values) {
  if ($form_values['smtp_on']) {
    if (!phpmailer_enabled()) {
      variable_set('smtp_library', drupal_get_filename('module', 'phpmailer'));
    }
  }
  else {
    if (phpmailer_enabled()) {
      variable_del('smtp_library');
    }
  }
}