You are here

function mailhandler_admin_delete_confirm_submit in Mailhandler 6

Same name and namespace in other branches
  1. 5 mailhandler.module \mailhandler_admin_delete_confirm_submit()
  2. 7 mailhandler.admin.inc \mailhandler_admin_delete_confirm_submit()

Submit hook for mailhandler_admin_delete_confirm form.

This function assumes that $form_state['values']['mailbox'] is present and it is a valid mailbox (verified at mailhandler_admin_delete_confirm_form).

File

./mailhandler.admin.inc, line 312
Administrator pages for the Mailhandler module.

Code

function mailhandler_admin_delete_confirm_submit($form, &$form_state) {
  $mailbox = $form_state['values']['mailbox'];
  drupal_set_message(t('Mailbox %mailbox deleted.', array(
    '%mailbox' => $mailbox['mail'],
  )));
  $form_state['redirect'] = 'admin/content/mailhandler';
  mailhandler_mailbox_delete($mailbox);
}