function phpmailer_form_mimemail_admin_settings_alter in PHPMailer 6.3
Same name and namespace in other branches
- 8.3 phpmailer.module \phpmailer_form_mimemail_admin_settings_alter()
- 6.2 phpmailer.module \phpmailer_form_mimemail_admin_settings_alter()
- 7.4 phpmailer.module \phpmailer_form_mimemail_admin_settings_alter()
- 7.3 phpmailer.module \phpmailer_form_mimemail_admin_settings_alter()
Implementation of hook_form_FORM_ID_alter().
File
- ./
phpmailer.module, line 41 - Integrates the PHPMailer library for SMTP e-mail delivery.
Code
function phpmailer_form_mimemail_admin_settings_alter(&$form, &$form_state) {
// Hide the Mime Mail global enabler setting if phpmailer is used to deliver
// e-mails (they can't be both active).
if (phpmailer_enabled()) {
$mimemail_alter =& $form['mimemail']['mimemail_alter'];
$mimemail_alter['#disabled'] = TRUE;
$mimemail_alter['#default_value'] = 0;
$mimemail_alter['#description'] = t('PHPMailer has been set to deliver all site messages. To let Mime Mail apply styles and formatting to system e-mails but still use PHPMailer for mail transport, uncheck <em>Use PHPMailer to send e-mails</em> first on the <a href="@url">PHPMailer settings page</a>. Then activate this setting and choose PHPMailer from the list of e-mail engines below.', array(
'@url' => url('admin/settings/phpmailer'),
));
}
// @todo Move to MimeMail project.
$form['preview'] = array(
'#type' => 'item',
'#title' => t('Preview'),
'#value' => t('See a <a href="@url" target="_blank">preview of a styled e-mail</a> using the current message template (<code>mimemail-message.tpl.php</code>).', array(
'@url' => url('phpmailer/preview'),
)),
);
$form['buttons']['#weight'] = 10;
}