You are here

function _mailhandler_mailbox_test_output in Mailhandler 6.2

Same name and namespace in other branches
  1. 7.2 mailhandler.module \_mailhandler_mailbox_test_output()
2 calls to _mailhandler_mailbox_test_output()
mailhandler_mailbox_ui::test_page in plugins/ctools/export_ui/mailhandler_mailbox_ui.class.php
Callback to test a mailbox connection.
_mailhandler_mailbox_test in ./mailhandler.module

File

./mailhandler.module, line 321
Retrieves email for posting as nodes and comments.

Code

function _mailhandler_mailbox_test_output($mailbox) {
  $output = '<div id="mailhandler_test_results" class="form-wrapper">';

  // Call the test function.
  if ($class = mailhandler_plugin_load_class('mailhandler', $mailbox->settings['retrieve'], 'retrieve', 'handler')) {
    $ret = $class
      ->test($mailbox);
  }
  foreach ($ret as $message) {
    $output .= '<div class="messages ' . $message['severity'] . '">' . $message['message'] . '</div>';
  }
  $output .= "</div>";
  return $output;
}