You are here

function swiftmailer_admin_messages_form_submit in Swift Mailer 7

Submit handler for swiftmailer_admin_messages_form($form, &$form_state).

File

includes/pages/swiftmailer_admin_messages.inc, line 149
An administration page which allows for configuration of how messages are to be formatted.

Code

function swiftmailer_admin_messages_form_submit($form, &$form_state) {
  if (isset($form_state['values']['sender']['name'])) {
    variable_set('swiftmailer_sender_name', $form_state['values']['sender']['name']);
  }
  if (isset($form_state['values']['sender']['email'])) {
    variable_set('swiftmailer_sender_email', $form_state['values']['sender']['email']);
  }
  if (isset($form_state['values']['format']['type'])) {
    variable_set('swiftmailer_format', $form_state['values']['format']['type']);
  }
  if (isset($form_state['values']['format']['respect'])) {
    variable_set('swiftmailer_respect_format', $form_state['values']['format']['respect']);
  }
  if (isset($form_state['values']['convert']['mode'])) {
    variable_set('swiftmailer_convert_mode', $form_state['values']['convert']['mode']);
  }
  if (isset($form_state['values']['convert']['library'])) {
    variable_set('swiftmailer_convert_library', $form_state['values']['convert']['library']);
  }
  if (isset($form_state['values']['character_set']['type'])) {
    variable_set('swiftmailer_character_set', $form_state['values']['character_set']['type']);
  }
}