3 /* functions for info plugin
4 * Copyright (c) 1999-2003 The SquirrelMail Project Team
5 * Licensed under the GNU GPL. For full terms see the file COPYING.
7 * Here are two functions for the info plugin
8 * The first gets the CAPABILITY response from your IMAP server.
9 * The second runs the passed IMAP test and returns the results
10 * The third prints the results of the IMAP command
12 * by: Jason Munro jason@stdbev.com
18 function get_caps($imap_stream) {
19 return sqimap_run_command_list($imap_stream, 'CAPABILITY',false, $responses, $message,false);
22 function imap_test($imap_stream, $string) {
23 global $default_charset;
24 print "<TR><TD>".$string."</TD></TR>";
25 $response = sqimap_run_command_list($imap_stream, trim($string),false, $responses, $message,false);
26 array_push($response, $responses . ' ' .$message);
30 function print_response($response) {
31 foreach($response as $index=>$value) {
32 if (is_array($value)) {
33 print_response($value);
36 $value = preg_replace("/</", "<", $value);
37 $value = preg_replace("/>/", ">", $value);
38 print $value."<BR>\n";