function phpmailer_form_alter in PHPMailer 5.2
Same name and namespace in other branches
- 6 phpmailer.module \phpmailer_form_alter()
Implementation of hook_form_alter().
File
- ./
phpmailer.module, line 43 - Integrates the PHPMailer library for SMTP e-mail delivery.
Code
function phpmailer_form_alter($form_id, &$form) {
if ($form_id == 'mimemail_settings') {
// Hide the mimemail global enabler setting if phpmailer is used to deliver
// all e-mails (they can't be both active).
if (phpmailer_enabled()) {
$form['mimemail']['mimemail_alter'] = array(
'#type' => 'value',
'#value' => 0,
);
}
// Add custom validation and submit handlers.
$form['#validate']['phpmailer_settings_form_validate'] = array();
$form['#submit']['phpmailer_settings_form_submit'] = array();
}
}