Updated documentation, fixed sorting problems in folder list.
[squirrelmail.git] / doc / sqimap_config.php3
CommitLineData
4ca45d7b 1<?
2$imap_stream_def = "The imap stream returned from <a href=\"#login\">sqimap_login</a>";
3
4$name[0] = "read_data";
5$params[0] = "(\$imap_stream, \$pre, \$handle_errors, &\$response, &\$message)";
6$explain[0] = "This is used to read information from the imap server. This handles error correction, error notification, etc. It will return an array of strings that contains the output for your use.";
7$params_desc[0][0]["name"] = "imap_stream";
8$params_desc[0][0]["desc"] = $imap_stream_def;
9$params_desc[0][0]["type"] = "int";
10$params_desc[0][1]["name"] = "pre";
11$params_desc[0][1]["desc"] = "The string that goes before any commands. In the example below, it is a001.";
12$params_desc[0][1]["type"] = "string";
13$params_desc[0][2]["name"] = "handle_errors";
14$params_desc[0][2]["desc"] = "Whether or not to handle all error messages for you";
15$params_desc[0][2]["type"] = "boolean";
16$params_desc[0][3]["name"] = "respone";
17$params_desc[0][3]["desc"] = "Returned if handle_errors is false. It is the server's response";
18$params_desc[0][3]["type"] = "string";
19$params_desc[0][4]["name"] = "message";
20$params_desc[0][4]["desc"] = "Returned if handle_errors is false. It is the error message";
21$params_desc[0][4]["type"] = "string";
22$example[0] = "fputs (\$imap_stream, \"a001 SELECT INBOX\\n\");<br>";
23$example[0] .="\$read_ary = sqimap_read_data(\$imap_stream, \"a001\", true, $response, $message);<br>";
24$example[0] .="for (\$i = 0; \$i &lt; count(\$read_ary); \$i++) {<br>";
25$example[0] .="&nbsp;&nbsp;&nbsp;&nbsp;echo \$read_ary[\$i];<br>";
26$example[0] .="}<br>";
27
28
29$name[1] = "login";
30$params[1] = "(\$username, \$password, \$imap_server_address, \$hide)";
31$explain[1] = "This function simply logs the specified user into the imap server.";
32$params_desc[1][0]["name"] = "username";
33$params_desc[1][0]["type"] = "string";
34$params_desc[1][0]["desc"] = "The user who you wish to log in.";
35$params_desc[1][1]["name"] = "password";
36$params_desc[1][1]["type"] = "string";
37$params_desc[1][1]["desc"] = "The password for the user.";
38$params_desc[1][2]["name"] = "imap_server_address";
39$params_desc[1][2]["type"] = "string";
40$params_desc[1][2]["desc"] = "Address of the IMAP server.";
41$params_desc[1][3]["name"] = "hide";
42$params_desc[1][3]["type"] = "boolean";
43$params_desc[1][3]["desc"] = "If set, this will hide all error messages from the login session.";
44$example[1] = "sqimap_login (\"luke\", \"lkajskw\", \"mail.luke.com\", false);";
45
46
47$name[2] = "logout";
48$params[2] = "(\$imap_stream)";
49$explain[2] = "This simply logs out whoever is logged into the \$imap_stream.";
50$params_desc[2][0]["name"] = "imap_stream";
51$params_desc[2][0]["type"] = "int";
52$params_desc[2][0]["desc"] = $imap_stream_def;
53$example[2] = "sqimap_logout (\$imap_stream);";
54
55
56$name[3] = "get_delimiter";
57$params[3] = "(\$imap_stream)";
58$explain[3] = "Each mailbox is delimited differently between IMAP servers. Some would look like \"INBOX.Folder\", but others might look like \"INBOX/Folder\". This function returns what the delimiter is so you can create mailboxes of your own.";
59$params_desc[3][0]["name"] = "imap_stream";
60$params_desc[3][0]["type"] = "int";
61$params_desc[3][0]["desc"] = $imap_stream_def;
62$example[3] = "\$dm = sqimap_get_delimiter(\$imap_stream);";
63
64
65$name[4] = "get_num_messages";
66$params[4] = "(\$imap_stream, \$mailbox)";
67$explain[4] = "Returns the number of messages in the specified folder.";
68$params_desc[4][0]["name"] = "imap_stream";
69$params_desc[4][0]["type"] = "int";
70$params_desc[4][0]["desc"] = $imap_stream_def;
71$params_desc[4][1]["name"] = "mailbox";
72$params_desc[4][1]["type"] = "string";
73$params_desc[4][1]["desc"] = "The mailbox that you wish to check out.";
74$example[4] = "$num = sqimap_get_num_messages (\$imap_stream, \"INBOX\");";
75
76/*
77$name[1] = "";
78$params[1] = "";
79$explain[1] = "";
80$params_desc[1][0]["name"] = "";
81$params_desc[1][0]["type"] = "";
82$params_desc[1][0]["desc"] = "";
83$params_desc[1][1]["name"] = "";
84$params_desc[1][1]["type"] = "";
85$params_desc[1][1]["desc"] = "";
86$params_desc[1][2]["name"] = "";
87$params_desc[1][2]["type"] = "";
88$params_desc[1][2]["desc"] = "";
89$params_desc[1][3]["name"] = "";
90$params_desc[1][3]["type"] = "";
91$params_desc[1][3]["desc"] = "";
92$example[0] = "";
93*/
94?>