I'd like to fetch mail from various folders, all within the same email account. To make it easier to manager, it would be nice to have the folder listed on the status panel (mailhandler_display). The attached patch does that.

Comments

jeffmurphy’s picture

StatusFileSize
new1.29 KB

I unwittingly reversed the patch. Attached is the correct patch. The change is fairly trivial:

 function mailhandler_display() {
   $destination = drupal_get_destination();
-  $header = array(t('Mailbox'), array('data' => t('Operations'), 'colspan' => 3));
+  $header = array(t('Mailbox'), t('Folder'), array('data' => t('Operations'), 'colspan' => 3));
   $rows = array();
   $result = db_query('SELECT * FROM {mailhandler} ORDER BY mail');
   while ($mailbox = db_fetch_object($result)) {
     $rows[] = array(
       "<a href=\"mailto:$mailbox->mail\">$mailbox->mail</a>",
+      $mailbox->folder,
moshe weitzman’s picture

Status: Needs review » Needs work

you need to check_plain() that folder before emitting it. we have to protect against xss even in the admin section ... we should add even more info about the mailbox i think.

scottrigby’s picture

Has there been any further work on this? :) Scott

z.stolar’s picture

Status: Needs work » Fixed
StatusFileSize
new1.37 KB

I corrected the patch and applied. Please review.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.