** Returns the delimeter between mailboxes: INBOX/Test, or INBOX.Test...
******************************************************************************/
function sqimap_get_delimiter ($imap_stream) {
- fputs ($imap_stream, ". LIST \"\" *\r\n");
+ fputs ($imap_stream, ". LSUB \"\" *\r\n");
$read = sqimap_read_data($imap_stream, ".", true, $a, $b);
$quote_position = strpos ($read[0], "\"");
$delim = substr ($read[0], $quote_position+1, 1);
$dm = sqimap_get_delimiter ($imap_stream);
- fputs ($imap_stream, "a001 LIST \"\" *\r\n");
+ fputs ($imap_stream, "a001 LIST \"INBOX\" *\r\n");
$read_ary = sqimap_read_data ($imap_stream, "a001", true, $response, $message);
$g = 0;
$phase = "inbox";
$boxes = sqimap_mailbox_list_all ($imap_stream);
echo "<FORM ACTION=\"folders_subscribe.php?method=sub\" METHOD=POST>\n";
- echo "<TT><SELECT NAME=mailbox>\n";
- for ($i = 0; $i < count($boxes); $i++) {
- $use_folder = true;
- for ($p = 0; $p < count($special_folders); $p++) {
- if ($boxes[$i]["unformatted"] == $special_folders[$p]) {
- $use_folder = false;
- } else if (substr($boxes[$i]["unformatted"], 0, strlen($trash_folder)) == $trash_folder) {
- $use_folder = false;
- }
-
- for ($q = 0; $q < count($boxes_sub); $q++) {
- if ($boxes[$i]["unformatted"] == $boxes_sub[$q]["unformatted"])
- $use_folder = false;
- }
- }
- if ($use_folder == true) {
- $box = $boxes[$i]["unformatted-dm"];
- $box2 = replace_spaces($boxes[$i]["formatted"]);
- echo " <OPTION VALUE=\"$box\">$box2\n";
- }
- }
- echo "</SELECT></TT>\n";
+ echo "<tt><input type=text size=32 name=mailbox></tt>";
echo "<INPUT TYPE=SUBMIT VALUE=\"";
echo _("Subscribe");
echo "\">\n";