function mailhandler_mailbox_test_submit in Mailhandler 6
Submit handler for Test mailbox button on mailhandler_add_edit_mailbox form.
This submit handler will not save any data, but the submitted values must be available for the next form building operation.
1 string reference to 'mailhandler_mailbox_test_submit'
- mailhandler_add_edit_mailbox in ./
mailhandler.admin.inc - Return a form for editing or creating an individual mailbox.
File
- ./
mailhandler.admin.inc, line 257 - Administrator pages for the Mailhandler module.
Code
function mailhandler_mailbox_test_submit($form, &$form_state) {
$mailbox = $form_state['values'];
mailhandler_mailbox_test($mailbox, $form, $form_state);
if (!($errors = form_get_errors())) {
drupal_set_message('Mailhandler was able to connect to the mailbox.');
}
// Do not save the data, but keep the form values updated.
$form_state['mailbox'] = $mailbox;
$form_state['rebuild'] = TRUE;
}