File: imap.xml

package info (click to toggle)
phpdoc 20020310-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 35,272 kB
  • ctags: 354
  • sloc: xml: 799,767; php: 1,395; cpp: 500; makefile: 200; sh: 140; awk: 51
file content (2615 lines) | stat: -rw-r--r-- 90,800 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
<?xml version="1.0" encoding="utf-8"?>
 <reference id="ref.imap">
  <title>IMAP, POP3 그리고 NNTP 함수</title>
  <titleabbrev>IMAP</titleabbrev>

  <partintro>
   <simpara>
    이 함수를 작동시키려면, <option role="configure">--with-imap</option>
    옵션으로 PHP를 컴파일해야 한다. 이 옵션은 c-client 라이브러리가 요구된다.
    <ulink url="&url.imap;">&url.imap;</ulink>으로부터 최신 버전을 내려받아
    컴파일 하시오. 그리고 <filename>c-client/c-client.a</filename>파일을
    <filename>/usr/local/lib/libc-client.a</filename>로,또는 다른 링크 경로에
    복사하시오.  
    <filename>c-client/rfc822.h</filename>,
    <filename>mail.h</filename> 과 <filename>linkage.h</filename>를 
    <filename>/usr/local/include</filename>이나 다른 include경로에
    복사하시오.
   </simpara>
   <simpara>
    이 함수는 그 이름에도 불구하고, <acronym>IMAP</acronym> 프로토콜에만
    한정되어 있지 않다. 이함수의 기초를 이루는 c-client 라이브러리는 또한
    <acronym>NNTP</acronym>, <acronym>POP3</acronym> 그리고 로컬 메일함
    접근 메쏘드를 지원한다. 
   </simpara>
   <para>
    이 문서는 여기서 제공되는 함수에 관계된 모든 주제를 설명 할 수는 없다.
    더 자세한 정보는 c-client 라이브러리 소스의 문서에 제공된다 
		(<filename>docs/internal.txt</filename>). 
    그리고 다음 RFC 문서들도 이와 관련된 정보를 제공한다:
    <itemizedlist>
     <listitem>
      <simpara>
       <ulink url="&url.rfc;rfc821.html">RFC821</ulink>: Simple Mail
			 Transfer Protocol (SMTP).
      </simpara>
     </listitem>
     <listitem>
      <simpara>
       <ulink url="&url.rfc;rfc822.html">RFC822</ulink>: Standard for
			 ARPA internet text messages.
      </simpara>
     </listitem>
     <listitem>
      <simpara>
       <ulink url="&url.rfc;rfc2060.html">RFC2060</ulink>: Internet
			 Message Access Protocol (IMAP) Version 4rev1. 
      </simpara>
     </listitem>
     <listitem>
      <simpara>
       <ulink url="&url.rfc;rfc1939.html">RFC1939</ulink>:  Post
			 Office Protocol Version 3 (POP3).
      </simpara>
     </listitem>
     <listitem>
      <simpara>
       <ulink url="&url.rfc;rfc977.html">RFC977</ulink>: Network News
			 Transfer Protocol (NNTP).
      </simpara>
     </listitem>
     <listitem>
      <simpara>
       <ulink url="&url.rfc;rfc2076.html">RFC2076</ulink>: Common
			 Internet Message Headers.
      </simpara>
     </listitem>
     <listitem>
      <simpara>
       <ulink url="&url.rfc;rfc2045.html">RFC2045</ulink> , <ulink
				url="&url.rfc;rfc2046.html">RFC2046</ulink> , <ulink
				url="&url.rfc;rfc2047.html">RFC2047</ulink> , <ulink
				url="&url.rfc;rfc2048.html">RFC2048</ulink> &amp; <ulink
				url="&url.rfc;rfc2049.html">RFC2049</ulink>: Multipurpose
			 Internet Mail Extensions (MIME).
      </simpara>
     </listitem>
    </itemizedlist> 
    더 자세한 사항은 David Wood씨가 저술한  
		<ulink url="&url.email.book;">Programming Internet Email</ulink>
		과 Dianna Mullet씨와 Kevin Mullet씨가 같이 저술한 
    <ulink url="&url.imap.book;">Managing IMAP</ulink>를 참고하시오. 
   </para>
  </partintro>

  <refentry id="function.imap-append">
   <refnamediv>
    <refname>imap_append</refname> 
    <refpurpose>
     특정 메일박스에 문자열 메시지를 덧붙인다.
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_append</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>mbox</parameter></methodparam>
      <methodparam><type>string</type><parameter>message</parameter></methodparam>
      <methodparam choice="opt"><type>string</type><parameter>flags</parameter></methodparam>
     </methodsynopsis>
    <para>
     성공하면 &true;를 에러가 발생하면 &false;를 리턴한다.
    </para>  
    <para>
     <function>imap_append</function>함수는 특정 
     메일박스<parameter>mbox</parameter>에 문자열 메시지를 덧붙인다.
     선택적 인수<parameter>flags</parameter>가 부여되면,
     <parameter>flags</parameter>도 그 메일박스에 쓴다.
    </para>
    <para>
     Cyrus IMAP 서버에 접근할 때에는, end-of-line terminator로 "\n" 대신에
     "\r\n"을 사용해야 한다. 그렇지 않으면 실패할 것이다.
    </para>
    <para>     
     <example>
      <title><function>imap_append</function> example</title>
      <programlisting role="php">
$stream = imap_open("{your.imap.host}INBOX.Drafts","username", "password");

$check = imap_check($stream);
print "Msg Count before append: ". $check->Nmsgs."\n";

imap_append($stream,"{your.imap.host}INBOX.Drafts"
                   ,"From: me@my.host\r\n"
                   ."To: you@your.host\r\n"
                   ."Subject: test\r\n"
                   ."\r\n"
                   ."this is a test message, please ignore\r\n"
                   );

$check = imap_check($stream);
print "Msg Count after append : ". $check->Nmsgs."\n";

imap_close($stream);
      </programlisting>
     </example>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-base64">
   <refnamediv>
    <refname>imap_base64</refname>
    <refpurpose>BASE64로 엔코딩된 텍스트를 디코딩한다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>imap_base64</methodname>
      <methodparam><type>string</type><parameter>text</parameter></methodparam>
     </methodsynopsis>
    <para>
     <function>imap_base64</function>함수는 BASE-64로 엔코딩되어 있는
     텍스트를 디코딩해준다
     (<ulink url="&url.rfc;rfc2045.html">RFC2045</ulink>의
     Section 6.8을 보라).
     디코딩된 메시지가 문자열로 리턴되어 진다.
    </para>
    <para>
     See also <function>imap_binary</function>.
    </para>
   </refsect1>
  </refentry>


  <refentry id="function.imap-body">
   <refnamediv>
    <refname>imap_body</refname>
    <refpurpose>메시지의 본문을 읽어온다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>imap_body</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>int</type><parameter>msg_number</parameter></methodparam>
      <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
     </methodsynopsis>
    <para>
     <function>imap_body</function> returns the body of the message,
     numbered <parameter> msg_number</parameter> in the current
     mailbox. The optional <parameter>flags</parameter> are a bit mask
     with one or more of the following:
     <function>imap_body</function>함수는 메시지의 본문을 리턴한다.
     즉, 현재메일박스의 <parameter> msg_number</parameter>번째의 메시지
     의 본문을 읽어 오게 된다.
     선택적 인수 <parameter>flags</parameter>는 다음 리스트의 비트마스크
     가 된다:
     <itemizedlist>
      <listitem>
       <simpara>
	FT_UID - The <parameter>msgno</parameter> is a UID
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	FT_PEEK - Do not set the \Seen flag if not already set
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	FT_INTERNAL - The return string is in internal format, will
	not canonicalize to CRLF.
       </simpara>
      </listitem>
     </itemizedlist>
    </para>
	  <para>
     <function>imap_body</function>함수는 메시지 본문을 완전히 복사해 올 것이다.
     multipart MIME-encoded 메시지의 한 부분을 뽑아내기 위해서는
     본문의 구조를 분석하는 <function>imap_fetchstructure</function>함수와
     한개의 본문 구성요소의 복사물을 뽑아오는 
     <function>imap_fetchbody</function>함수를 이용해야 한다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-check">
   <refnamediv>
    <refname>imap_check</refname>
    <refpurpose>현재 메일 박스를 체크한다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>object</type><methodname>imap_check</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
     </methodsynopsis>
    <para>
     현재 메일 박스에 대한 정보를 리턴한다. 실패하면 &false;를 리턴한다.
    </para>  
    <para> 
     <function>imap_check</function> 함수는 서버에서 현재 메일박스의
     상태를 체크하고 다음 속성을 갖는 객체로 정보를 리턴한다:
    </para>
    <para>
     <itemizedlist>
      <listitem>
       <simpara>
        Date - last change of mailbox contents
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	Driver - protocol used to access this mailbox: POP3, IMAP, NNTP
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	Mailbox - the mailbox name
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	Nmsgs - number of messages in the mailbox
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	Recent - number of recent messages in the mailbox
       </simpara>
      </listitem>
     </itemizedlist>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-close">
   <refnamediv>
    <refname>imap_close</refname>
    <refpurpose>IMAP 스트림을 닫는다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_close</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
     </methodsynopsis>
    <para> 
     imap 스트림을 닫는다.
     선택적 인수 <parameter>flag</parameter>를 CL_EXPUNGE로 세팅하면,
     스트림을 닫기 전에 조용히(silently) 메일 박스를 지울 것이다.
     삭제 마크된 메시지만 모두 삭제한다. 
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-createmailbox">
   <refnamediv>
    <refname>imap_createmailbox</refname>
    <refpurpose>새 메일 박스를 만든다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_createmailbox</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>mbox</parameter></methodparam>
     </methodsynopsis>
    <para>  
     <function>imap_createmailbox</function>는
     <parameter>mbox</parameter>인수에 주어진 이름으로 새 메일 박스를 만든다.
     국제적인 문자들을 포함한 이름이면  <function>imap_utf7_encode</function>
     함수로 인코딩되어야 한다.
    </para> 
    <para>
     성공하면 &true;를 실패하면 &false;를 리턴한다.
    </para>
    <para>
     See also <function>imap_renamemailbox</function>,
     <function>imap_deletemailbox</function> and
     <function>imap_open</function> for the format 
     of <parameter>mbox</parameter> names. 
    </para>
    <para>     
     <example>
      <title><function>imap_createmailbox</function> example</title>
      <programlisting>
$mbox = imap_open("{your.imap.host}","username","password",OP_HALFOPEN)
     || die("can't connect: ".imap_last_error());

$name1 = "phpnewbox";
$name2 = imap_utf7_encode("phpnewb&ouml;x");

$newname = $name1;

echo "Newname will be '$name1'&lt;br>\n";

# we will now create a new mailbox "phptestbox" in your inbox folder,
# check its status after creation and finaly remove it to restore
# your inbox to its initial state 
if(@imap_createmailbox($mbox,imap_utf7_encode("{your.imap.host}INBOX.$newname"))) {
  $status = @imap_status($mbox,"{your.imap.host}INBOX.$newname",SA_ALL);
  if($status) {
    print("your new mailbox '$name1' has the following status:&lt;br>\n");
    print("Messages:   ". $status->messages   )."&lt;br>\n";
    print("Recent:     ". $status->recent     )."&lt;br>\n";
    print("Unseen:     ". $status->unseen     )."&lt;br>\n";
    print("UIDnext:    ". $status->uidnext    )."&lt;br>\n";
    print("UIDvalidity:". $status->uidvalidity)."&lt;br>\n";
    
    if(imap_renamemailbox($mbox,"{your.imap.host}INBOX.$newname","{your.imap.host}INBOX.$name2")) {
      echo "renamed new mailbox from '$name1' to '$name2'&lt;br>\n";
      $newname=$name2;
    } else {
      print "imap_renamemailbox on new mailbox failed: ".imap_last_error()."&lt;br>\n";
    }
  } else {
    print  "imap_status on new mailbox failed: ".imap_last_error()."&lt;br>\n";
  }
  if(@imap_deletemailbox($mbox,"{your.imap.host}INBOX.$newname")) {
    print "new mailbox removed to restore initial state&lt;br>\n";
  } else {
    print  "imap_deletemailbox on new mailbox failed: ".implode("&lt;br>\n",imap_errors())."&lt;br>\n";
  }
  
} else {
  print  "could not create new mailbox: ".implode("&lt;br>\n",imap_errors())."&lt;br>\n";
}

imap_close($mbox);
      </programlisting>
     </example>
    </para>     
   </refsect1>
  </refentry>

  <refentry id="function.imap-delete">
   <refnamediv>
    <refname>imap_delete</refname>
    <refpurpose>
     현재 메일 박스에서 삭제될 메시지를 표시한다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_delete</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>int</type><parameter>msg_number</parameter></methodparam>
      <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
     </methodsynopsis>
    <para>
     &true;를 리턴한다.
    </para> 
    <para> 
     <function>imap_delete</function>함수는
     <parameter>msg_number</parameter>번의 메시지를 지움 표시 한다.
     선택적 인수<parameter>flags</parameter>는 오직 하나의 옵션만 있다.
     즉, <parameter>msg_number</parameter>를 <parameter>UID</parameter>로
     취급할것인지 함수에게 알려주는 <parameter>FT_UID</parameter>의 옵션만 있다.
     지움 표시된 메시지는 <function>imap_expunge</function>함수나 
     CL_EXPUNGE 옵션을 갖는 <function>imap_close</function> 함수가 불려지기
     전까지는 삭제되지 않는다.
    </para>
    <para>     
     <example>
      <title><function>imap_delete</function> Beispiel</title>
      <programlisting role="php">
$mbox = imap_open ("{your.imap.host}INBOX", "username", "password")
    || die ("can't connect: " . imap_last_error());

$check = imap_mailboxmsginfo ($mbox);
print "Messages before delete: " . $check->Nmsgs . "&lt;br>\n" ;
imap_delete ($mbox, 1);
$check = imap_mailboxmsginfo ($mbox);
print "Messages after  delete: " . $check->Nmsgs . "&lt;br>\n" ;
imap_expunge ($mbox);
$check = imap_mailboxmsginfo ($mbox);
print "Messages after expunge: " . $check->Nmsgs . "&lt;br>\n" ;
imap_close ($mbox);
      </programlisting>
     </example>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-deletemailbox">
   <refnamediv>
    <refname>imap_deletemailbox</refname>
    <refpurpose>메일 박스를 지운다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_deletemailbox</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>mbox</parameter></methodparam>
     </methodsynopsis>
    <para> 
     <function>imap_deletemailbox</function>함수는 특정 메일 박스를
     지운다 (<parameter>mbox</parameter> 이름의 형식을 알려면
      <function>imap_open</function>함수를 보시오).
    </para>  
    <para>
     성공하면 &true;를 실패하면 &false;를 리턴한다.
    </para>
    <para>
     See also <function>imap_createmailbox</function>, 
     <function>imap_renamemailbox</function>, and 
     <function>imap_open</function> for the format of
     <parameter>mbox</parameter>.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-expunge">
   <refnamediv>
    <refname>imap_expunge</refname>
    <refpurpose>지움 표시된 모든 메시지를 완전히 삭제한다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_expunge</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
     </methodsynopsis>
    <para>  
     <function>imap_expunge</function>함수는 <function>imap_delete</function>, 
     <function>imap_mail_move</function> 또는  
     <function>imap_setflag_full</function>함수에 의해 지움 표시된 모든
     메시지를 완전히 삭제한다.
    </para>
    <para>
     Returns &true;.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-fetchbody">
   <refnamediv>
    <refname>imap_fetchbody</refname>
    <refpurpose>
     메시지의 본문중에서 특정 부분을 페치한다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>imap_fetchbody</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>int</type><parameter>msg_number</parameter></methodparam>
      <methodparam><type>string</type><parameter>part_number</parameter></methodparam>
      <methodparam choice="opt"><type>flags</type><parameter>flags</parameter></methodparam>
     </methodsynopsis>
    <para>
     이 함수는 지정된 메시지의 본문중에서 특정 섹션을 텍스트 문자열로 페치하고,
     그 텍스트 문자열을 가져온다.
     섹션의 요구사양(specification)은 IMAP 4 요구사양(specification)대로
     바디 부분(body part) 목록의 색인으로 구분되는 
     단락의 정수(integer)문자열이다.
     본문 각 부분들은 이 함수에 의해 디코딩되지 않는다.
    </para>
    <para>
     <function>imap_fetchbody</function>함수에 대한 옵션은 다음 리스트의
     하나 이상의 비트 마스크(bitmask)값이다:
     <itemizedlist>
      <listitem>
       <simpara>
	FT_UID - The <parameter>msg_number</parameter> is a UID
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	FT_PEEK - Do not set the \Seen flag if not already set
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	FT_INTERNAL - The return string is in "internal" format,
	without any attempt to canonicalize CRLF.
       </simpara>
      </listitem>
     </itemizedlist>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-fetchstructure">
   <refnamediv>
    <refname>imap_fetchstructure</refname> 
    <refpurpose>
     특별한 메시지의 구조체를 읽어온다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>object</type><methodname>imap_fetchstructure</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>int</type><parameter>msg_number</parameter></methodparam>
      <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
     </methodsynopsis>
    <para>
     이 함수는 주어진 메시지의 구조화된 모든 정보를 페치한다.
     선택적 인수<parameter>flags</parameter>는 오직 하나의 옵션만 있다.
     즉, <parameter>msg_number</parameter>를 <parameter>UID</parameter>로
     취급할것인지 함수에게 알려주는 <parameter>FT_UID</parameter>의 옵션만 있다.
     리턴된 객체는 envelope, internal date, size, flags와 각 mime첨부파일과
     비슷한 객체를 갖는 본문 구조체이다.
     리턴되는 객체의 구조는 다음과 같다:
    </para>
    <para>
     <table>
      <title>
       <function>imap_fetchstructure</function>에 의해 리턴되는 객체
      </title>
      <tgroup cols="2">
       <tbody>
	<row>
	 <entry>type</entry>
	 <entry>Primary body type</entry>
	</row>
	<row>
	 <entry>encoding</entry>
	 <entry>Body transfer encoding</entry>
	</row>
	<row>
	 <entry>ifsubtype</entry>
	 <entry>&true; if there is a subtype string</entry>
	</row>
	<row>
	 <entry>subtype</entry>
	 <entry><acronym>MIME</acronym> subtype</entry>
	</row>
	<row>
	 <entry>ifdescription</entry>
	 <entry>&true; if there is a description string</entry>
	</row>
	<row>
	 <entry>description</entry>
	 <entry>Content description string</entry>
	</row>
	<row>
	 <entry>ifid</entry>
	 <entry>&true; if there is an identification string</entry>
	</row>
	<row>
	 <entry>id</entry>
	 <entry>Identification string</entry>
	</row>
	<row>
	 <entry>lines</entry>
	 <entry>Number of lines</entry>
	</row>
	<row>
	 <entry>bytes</entry>
	 <entry>Number of bytes</entry>
	</row>
	<row>
	 <entry>ifdisposition</entry>
	 <entry>&true; if there is a disposition string</entry>
	</row>
	<row>
	 <entry>disposition</entry>
	 <entry>Disposition string</entry>
	</row>
	<row>
	 <entry>ifdparameters</entry>
	 <entry>&true; if the dparameters array exists</entry>
	</row>
	<row>
	 <entry>dparameters</entry>
	 <entry>Disposition parameter array</entry>
	</row>
	<row>
	 <entry>ifparameters</entry>
	 <entry>&true; if the parameters array exists</entry>
	</row>
	<row>
	 <entry>parameters</entry>
	 <entry><acronym>MIME</acronym> parameters array</entry>
	</row>
	<row>
	 <entry>parts</entry>
	 <entry>Array of objects describing each message part</entry>
	</row>
       </tbody>
      </tgroup>
     </table>
    </para>
    <note>
     <orderedlist>
      <listitem>
       <para>
	dparameters is an array of objects where each object has an
	"attribute" and a "value" property.
       </para>
      </listitem>
      <listitem>
       <para>
	Parameter is an array of objects where each object has an
	"attributte" and a "value" property.
       </para>
      </listitem>
      <listitem>
       <para>
	Parts is an array of objects identical in structure to the
	top-level object, with the limitation that it cannot contain
	further 'parts' objects.
       </para>
      </listitem>
     </orderedlist>
    </note>
    <para>
     <table>
       <title>Primary body type</title>
       <tgroup cols="2">
        <tbody>
        <row><entry>0</entry><entry>text</entry></row>
        <row><entry>1</entry><entry>multipart</entry></row>
        <row><entry>2</entry><entry>message</entry></row>
        <row><entry>3</entry><entry>application</entry></row>
        <row><entry>4</entry><entry>audio</entry></row>
        <row><entry>5</entry><entry>image</entry></row>
        <row><entry>6</entry><entry>video</entry></row>
        <row><entry>7</entry><entry>other</entry></row>
        </tbody>
       </tgroup>
     </table>
    </para>
    <para>
     <table>
       <title>Transfer encodings</title>
       <tgroup cols="2">
        <tbody>
        <row><entry>0</entry><entry>7BIT</entry></row>
        <row><entry>1</entry><entry>8BIT</entry></row>
        <row><entry>2</entry><entry>BINARY</entry></row>
        <row><entry>3</entry><entry>BASE64</entry></row>
        <row><entry>4</entry><entry>QUOTED-PRINTABLE</entry></row>
        <row><entry>5</entry><entry>OTHER</entry></row>
       </tbody>
      </tgroup>
     </table>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-headerinfo">
   <refnamediv>
    <refname>imap_headerinfo</refname>
    <refpurpose>메시지의 머릿글을 읽어온다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>

     <type>object</type><methodname>imap_headerinfo</methodname>
     <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
     <methodparam><type>int</type><parameter>msg_number</parameter></methodparam>
     <methodparam choice="opt"><type>int</type><parameter>fromlength</parameter></methodparam>
     <methodparam choice="opt"><type>int</type><parameter>subjectlength</parameter></methodparam>
     <methodparam choice="opt"><type>string</type><parameter>defaulthost</parameter></methodparam>
     </methodsynopsis>
    <para>
     이 함수는 다양한 머릿글 구성요소의 객체를 가져온다.
    </para>
    <para>  
     <informalexample>
      <literallayout>
       remail, date, Date, subject, Subject, in_reply_to, message_id,
       newsgroups, followup_to, references

message flags:
   Recent -  'R' if recent and seen, 
             'N' if recent and not seen, 
             ' ' if not recent
   Unseen -  'U' if not seen AND not recent, 
             ' ' if seen OR not seen and recent
   Answered -'A' if answered, 
             ' ' if unanswered
   Deleted - 'D' if deleted, 
             ' ' if not deleted
   Draft -   'X' if draft, 
             ' ' if not draft
   Flagged - 'F' if flagged, 
             ' ' if not flagged

NOTE that the Recent/Unseen behavior is a little odd. If you want to
know if a message is Unseen, you must check for

Unseen == 'U' || Recent == 'N'

toaddress (full to: line, up to 1024 characters)

to[] (returns an array of objects from the To line, containing):
   personal
   adl
   mailbox
   host

fromaddress (full from: line, up to 1024 characters)

from[] (returns an array of objects from the From line, containing):
   personal
   adl
   mailbox
   host

ccaddress (full cc: line, up to 1024 characters)
cc[] (returns an array of objects from the Cc line, containing):
   personal
   adl
   mailbox
   host

bccaddress (full bcc line, up to 1024 characters)
bcc[] (returns an array of objects from the Bcc line, containing):
   personal
   adl
   mailbox
   host

reply_toaddress (full reply_to: line, up to 1024 characters)
reply_to[] (returns an array of objects from the Reply_to line,
containing):
   personal
   adl
   mailbox
   host

senderaddress (full sender: line, up to 1024 characters)
sender[] (returns an array of objects from the sender line, containing):
   personal
   adl
   mailbox
   host

return_path (full return-path: line, up to 1024 characters)
return_path[] (returns an array of objects from the return_path line,
containing):
   personal
   adl
   mailbox
   host

udate (mail message date in unix time)

fetchfrom (from line formatted to fit <parameter>fromlength</parameter> 
characters)

fetchsubject (subject line formatted to fit <parameter>subjectlength</parameter> characters)
      </literallayout>
     </informalexample>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-header">
   <refnamediv>
    <refname>imap_header</refname>
    <refpurpose>Read the header of the message</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>

     <type>object</type><methodname>imap_header</methodname>
     <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
     <methodparam><type>int</type><parameter>msg_number</parameter></methodparam>
     <methodparam choice="opt"><type>int</type><parameter>fromlength</parameter></methodparam>
     <methodparam choice="opt"><type>int</type><parameter>subjectlength</parameter></methodparam>
     <methodparam choice="opt"><type>string</type><parameter>defaulthost</parameter></methodparam>
     </methodsynopsis>
    <para>
     This is an alias to <function>imap_headerinfo</function>
     and is identical to this in any way.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-rfc822-parse-headers">
   <refnamediv>
    <refname>imap_rfc822_parse_headers</refname>
    <refpurpose>문자열에서 메일 헤더를 해석한다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>object</type><methodname>imap_rfc822_parse_headers</methodname>
      <methodparam><type>string</type><parameter>headers</parameter></methodparam>
      <methodparam choice="opt"><type>string</type><parameter>defaulthost</parameter></methodparam>
     </methodsynopsis>
    <para>
     이함수는 다양한 헤더 구성요소의 객체를 돌려준다.
     <function>imap_header</function>함수와 비슷하지만,
     flags 인수를 갖지 않는 것이 다르다.
    </para>
   </refsect1>
  </refentry>

<refentry id="function.imap-headers">
   <refnamediv>
    <refname>imap_headers</refname>
    <refpurpose>
     메일박스에서 모든 메시지의 헤더를 돌려준다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>imap_headers</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
     </methodsynopsis>
    <para>
     Returns an array of string formatted with header info. One
     element per mail message.
     헤더 정보를 갖는 형식화된 문자열의 배열을 돌려준다.
     각 메일 메시지당 하나의 배열요소를 갖는다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-listmailbox">
   <refnamediv>
    <refname>imap_listmailbox</refname>
    <refpurpose>메일박스의 목록을 읽어온다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>imap_listmailbox</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>ref</parameter></methodparam>
      <methodparam><type>string</type><parameter>pattern</parameter></methodparam>
     </methodsynopsis>
    <para>
     Returns an array containing the names of the mailboxes.
     See <function>imap_getmailboxes</function> for a description
     of <parameter>ref</parameter> and <parameter>pattern</parameter>.
     메일박스의 이름을 포함한 배열을 돌려준다.
     더 자세한 것은 
     <parameter>ref</parameter>과 <parameter>pattern</parameter>의
     <function>imap_getmailboxes</function>를 보라
    </para>
    <para>
     <example>
      <title><function>imap_listmailbox</function> example</title>
      <programlisting role="php">
$mbox = imap_open("{your.imap.host}","username","password",OP_HALFOPEN)
      || die("can't connect: ".imap_last_error());
 
$list = imap_listmailbox($mbox,"{your.imap.host}","*");
if(is_array($list)) {
  reset($list);
  while (list($key, $val) = each($list))
    print imap_utf7_decode($val)."&lt;br>\n";
} else
  print "imap_listmailbox failed: ".imap_last_error()."\n";
 
imap_close($mbox);                                                                
      </programlisting>
     </example>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-getmailboxes">
   <refnamediv>
    <refname>imap_getmailboxes</refname>
    <refpurpose>
     메일박스의 목록을 읽어오고, 각 메일박스에 대한 상세한 정보를 돌려준다.
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>imap_getmailboxes</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>ref</parameter></methodparam>
      <methodparam><type>string</type><parameter>pattern</parameter></methodparam>
     </methodsynopsis>
    <para>
     메일박스 정보를 포함하는 객체의 배열을 돌려준다. 각 객체는
     다음 속성을 갖는다.
     메일박스의 완전한 이름을 갖는 <parameter>name</parameter>속성;
     메일 박스안에 포함된 분류체계(hierarchy)의 부분을 위한 
     분류체계 한정자(hirerarchy delimiter) <parameter>delimiter</parameter>속성;
     그리고 <parameter>attributes</parameter>. <parameter>Attributes</parameter>
     속성은 다음에 대해서 테스트될 수 있는 비트마스크(bitmask)값이다:
     <itemizedlist>
      <listitem>
       <simpara>
	LATT_NOINFERIORS - This mailbox has no "children" (there are
	no mailboxes below this one).
       </simpara>
      </listitem>
     <listitem>
       <simpara>
	LATT_NOSELECT - This is only a container, not a mailbox - you
	cannot open it.
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	LATT_MARKED - This mailbox is marked. Only used by UW-IMAPD.
       </simpara>
      </listitem> 
      <listitem>
       <simpara> 
	LATT_UNMARKED - This mailbox is not marked. Only used by
	UW-IMAPD.
       </simpara>
      </listitem> 
     </itemizedlist>
    </para>
    <para>
     메일 박스 이름이 출력가능한 아스키(ASCII)코드 범위 밖의
     국제적인 문자를 포함한다면 인코딩해야 할것이고,
     <function>imap_utf7_decode</function>함수로 디코딩해야 할것이다.
    </para>
    <para>
     <parameter>ref</parameter>인수는 <function>imap_open</function>함수
     에서와 같이 서버의 사양이면 된다.그리고 <parameter>pattern</parameter>
     인수는 검색을 시작할 메일 박스의 위치이다.
     모든 메일 박스에 적용시키려면 <parameter>pattern</parameter>인수에
     '*'라고 하면 된다. 
    </para>
    <para>
     <parameter>pattern</parameter>인수로 쓸 수 있는 두개의 특별한
     문자들이 있다 : '*' 과 '%'문자이다.
     '*'은 모든 메일박스를 돌려줌을 의미한다.
     <parameter>pattern</parameter>인수에 '*'를 쓰면 모든 메일 박스 
     체계(hierarchy)
     의 목록을 얻을 수 있다. '%'는 현재 레벨만을 돌려준다는 걸 의미한다.
     <parameter>pattern</parameter>인수에 '%'를 쓰면 최상위 레벨의 메일박스
     만을 돌려줄 것이다; UW_IMAPD에 관해 '~/mail/%'을 쓰면  ~/mail 디렉토리의
     모든 메일 박스를 돌려주지만, 하위디렉토리는 포함되지 않는다.
    </para>
    <para>
     <example>
      <title><function>imap_getmailboxes</function> example</title>
      <programlisting role="php">
$mbox = imap_open("{your.imap.host}","username","password",OP_HALFOPEN)
      || die("can't connect: ".imap_last_error());
 
$list = imap_getmailboxes($mbox,"{your.imap.host}","*");
if(is_array($list)) {
  reset($list);
  while (list($key, $val) = each($list))
  {
    print "($key) ";
    print imap_utf7_decode($val->name).",";
    print "'".$val->delimiter."',";
    print $val->attributes."&lt;br>\n";
  }
} else
  print "imap_getmailboxes failed: ".imap_last_error()."\n";
 
imap_close($mbox);                                                                
      </programlisting>
     </example>
    </para>
		<para>
		 See also <function>imap_getsubscribed</function>.
		</para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-listsubscribed">
   <refnamediv>
    <refname>imap_listsubscribed</refname>
    <refpurpose>subscribed된 모든 메일박스의 목록을 보여준다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>imap_listsubscribed</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>ref</parameter></methodparam>
      <methodparam><type>string</type><parameter>pattern</parameter></methodparam>
     </methodsynopsis>
    <para>
     subscribed된 모든 메일박스의 배열을 돌려준다. 이함수는 거의
     <function>imap_listmailbox</function>함수와 동일하다.
     단지 로그인 한 유저가 subscribed한 메일박스만 돌려줄 뿐이다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-getsubscribed">
   <refnamediv>
    <refname>imap_getsubscribed</refname>
    <refpurpose>subscribed된 모든 메일 박스의 목록을 보여준다.</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>imap_getsubscribed</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>ref</parameter></methodparam>
      <methodparam><type>string</type><parameter>pattern</parameter></methodparam>
     </methodsynopsis>
    <para>
     <function>imap_getmailboxes</function>함수와 동일하다.
     단 유저가 subscribed한 메일박스만 돌려줄 뿐이다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-mail-copy">
   <refnamediv>
    <refname>imap_mail_copy</refname>
    <refpurpose>메일박스에 특정 메시지를 복사한다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_mail_copy</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>msglist</parameter></methodparam>
      <methodparam><type>string</type><parameter>mbox</parameter></methodparam>
      <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
     </methodsynopsis>
    <para>
     성공하면 &true;를 에러가 발생하면 &false;를 돌려준다.
    </para>  
    <para> 
     <parameter>msglist</parameter>인수에 의해 지정된 메일 메시지를 
     특정 메일 박스에 복사한다.<parameter>msglist</parameter>인수는
     메시지 번호만이 아니라 범위도 된다
     (<ulink url="&url.rfc;rfc2060.html">RFC2060</ulink>문서에 기술 되어있다).
    </para>
    <para>
     Flags인수는 다음 옵션들의 비트 마스트(bitmask)값이다.
     <itemizedlist>
      <listitem>
       <simpara>
	CP_UID - the sequence numbers contain UIDS
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	CP_MOVE - Delete the messages from the current mailbox after
	copying
       </simpara>
      </listitem>
     </itemizedlist>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-mail-move">
   <refnamediv>
    <refname>imap_mail_move</refname>
    <refpurpose>메일박스에 특정 메시지를 이동시킨다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_mail_move</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>msglist</parameter></methodparam>
      <methodparam><type>string</type><parameter>mbox</parameter></methodparam>
      <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
     </methodsynopsis>
    <para> 
     <parameter>msglist</parameter>인수에 의해 지정된 메일 메시지를
     특정 메일 박스에 이동시킨다.<parameter>msglist</parameter>인수는
     메시지 번호만이 아니라 범위도 된다
     (<ulink url="&url.rfc;rfc2060.html">RFC2060</ulink>문서에 기술 되어있다).
    </para>
    <para>
     Flags인수는 비트마스크(bitmask)값이고 오직 하나의 옵션만을 갖는다
     <itemizedlist>
      <listitem>
       <simpara>
	CP_UID - the sequence numbers contain UIDS
       </simpara>
      </listitem>
     </itemizedlist>
    </para>
    <para>
     성공하면 &true;를 에러가 발생하면 &false;를 리턴한다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-num-msg">
   <refnamediv>
    <refname>imap_num_msg</refname>
    <refpurpose>
     현재 메일박스의 메시지 갯수를 돌려준다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_num_msg</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
     </methodsynopsis>
    <para>
     현재 메일박스의 메시지 갯수를 돌려준다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-num-recent">
   <refnamediv>
    <refname>imap_num_recent</refname>
    <refpurpose>현재 메일박스의 새로운 메시지 갯수를 돌려준다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_num_recent</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
     </methodsynopsis>
    <para>
     현재 메일박스의 새로운 메시지 갯수를 돌려준다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-open">
   <refnamediv>
    <refname>imap_open</refname>
    <refpurpose>메일박스에 IMAP 스트림(stream)을 연다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_open</methodname>
      <methodparam><type>string</type><parameter>mailbox</parameter></methodparam>
      <methodparam><type>string</type><parameter>username</parameter></methodparam>
      <methodparam><type>string</type><parameter>password</parameter></methodparam>
      <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
     </methodsynopsis>
    <para>
     성공하면 IMAP 스트림(stream)을 돌려주고 에러가 발생하면 &false;를 넘겨준다.
     이 함수는 POP3나 NNTP서버의 스트림(stream)을 열 때에도 사용된다.
     하지만 어떤 함수나 특성은 IMAP 서버에 적용되지 않는다. 
    </para>
    <para>
     메일박스의 이름은 서버와 관련한 서버 부분과 메일박스 경로로 구성된다.
     특별한 이름을 갖는 INBOX는 현재 유저의 개인 메일박스이다.
     서버 부분은 '{'과 '}'로 둘려싸여지고, 서버의 이름이나 ip 주소, 프로토콜
     사양('/'로 시작하는곳) 그리고 ':'로 시작하는 선택적인 포트로 구성된다.
     서버 부분은 모든 메일박스의 필수 인수이다. 메일박스 이름이 출력가능한
     아스키(ASCII)범위를 벗어난 국제적인 문자를 포함하면 
     <function>imap_utf7_encode</function>함수로 인코딩되어야 한다.
    </para>
    <para>
     옵션은 다음을 한개이상 포함하는 비트마스크(bit mask)값이다.
     <itemizedlist>
      <listitem>
       <simpara>
	OP_READONLY - Open mailbox read-only
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	OP_ANONYMOUS - Dont use or update a
	<filename>.newsrc</filename> for news (NNTP only)
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	OP_HALFOPEN - For IMAP and NNTP names, open a connection but
	dont open a mailbox
       </simpara>
      </listitem> 
      <listitem>
       <simpara>
	CL_EXPUNGE - Expunge mailbox automatically upon mailbox close
       </simpara>
      </listitem>
     </itemizedlist>
    </para>
    <para>
     로컬 머신의 143포트에서 서비스되고 있는 IMAP서버에 접속하려면,
     다음과 같이 하시오:
     <informalexample>
      <programlisting role="php"> 
$mbox = imap_open ("{localhost:143}INBOX", "user_id", "password");
      </programlisting>
     </informalexample>
     로컬 머신의 110포트에서 서비스되고 있는 POP3서버에 접속하려면,
     다음과 같이 하시오:
     <informalexample>
      <programlisting role="php">
$mbox = imap_open ("{localhost/pop3:110}INBOX", "user_id", "password");
      </programlisting>
     </informalexample>
     로컬 머신의 119포트에서 서비스되고 있는 NNTP서버에 접속하려면,
     다음과 같이 하시오:
     <informalexample>
      <programlisting role="php">
$nntp = imap_open ("{localhost/nntp:119}comp.test", "", "");
      </programlisting>
     </informalexample>
     원격 서버에 접속하려면 "localhost"대신에 접속할 원격의서버의 서버이름 
     또는 아이피 주소를 쓰시오.
    </para>
    <para>
     <example>
      <title><function>imap_open</function> example</title>
      <programlisting role="php">
$mbox = imap_open ("{your.imap.host:143}", "username", "password");

echo "&lt;p>&lt;h1>Mailboxes&lt;/h1>\n";
$folders = imap_listmailbox ($mbox, "{your.imap.host:143}", "*");

if ($folders == false) {
    echo "Call failed&lt;br>\n";
} else {
    while (list ($key, $val) = each ($folders)) {
        echo $val."&lt;br>\n";
    }
}

echo "&lt;p>&lt;h1>Headers in INBOX&lt;/h1>\n";
$headers = imap_headers ($mbox);

if ($headers == false) {
    echo "Call failed&lt;br>\n";
} else {
    while (list ($key,$val) = each ($headers)) {
        echo $val."&lt;br>\n";
    }
}

imap_close($mbox);
      </programlisting>
     </example>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-ping">
   <refnamediv>
    <refname>imap_ping</refname>
    <refpurpose>IMAP 스트림(stream)이 아직 사용가능한지 체크한다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_ping</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
     </methodsynopsis>
    <para>  
     Returns &true; if the stream is still alive, &false; otherwise.
     스트림(stream)이 아직 살아있다면 &true;를 리턴하고, 그외에는 &false;를 리턴한다
    </para>
    <para>
     <function>imap_ping</function>함수는 스트림(stream)이 아직 사용가능한지
     보기 위해 스트림에 핑(ping)을 한다. 이 함수는 새로운 메일을 발견한다;
     이 함수는 주기적인 "새로운 메일 점검"은 물론 타임아웃(timeout)을
     갖는 서버에게 "접속 유지"를 위한 방법으로 선호된다.
     ( PHP 스크립트는 오랜 시간동안 실행되지 않기 때문에, 나는 
     이 함수가 거의 유용하지 않을 것이라고 생각한다. )
     
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-renamemailbox">
   <refnamediv>
    <refname>imap_renamemailbox</refname>
    <refpurpose>메일박스의 이름을 바꾼다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_renamemailbox</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>old_mbox</parameter></methodparam>
      <methodparam><type>string</type><parameter>new_mbox</parameter></methodparam>
     </methodsynopsis>
    <para> 
     이 함수는 메일박스의 이름을 바꾼다(<parameter>mbox</parameter>이름의
     형식은 <function>imap_open</function>함수를 보면 알수 있다)
    </para>
    <para>
     성공하면 &true;를 리턴하고 에러가 발생하면 &false;를 리턴한다.
    </para>
    <para>
     <parameter>mbox</parameter>형식에 대해서는 또한
     <function>imap_createmailbox</function>함수, 
     <function>imap_deletemailbox</function>함수, 그리고
     <function>imap_open</function>함수를 보시오.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-reopen">
   <refnamediv>
    <refname>imap_reopen</refname>
    <refpurpose>새로운 메일박스에 IMAP 스트림(stream)을 다시 연다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_reopen</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>mailbox</parameter></methodparam>
      <methodparam choice="opt"><type>string</type><parameter>flags</parameter></methodparam>
     </methodsynopsis>
    <para>  
     이 함수는 IMAP 또는 NNTP 서버에서 새로운 메일박스에 특정 스트림(stream)을
     다시 연다.
    </para>
    <para>
     옵션은 다음의 한개 이상의 비트마스트(bit mask)값이다:
     <itemizedlist>
      <listitem>
       <simpara>
	OP_READONLY - Open mailbox read-only
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	OP_ANONYMOUS - Dont use or update a
	<filename>.newsrc</filename> for news (NNTP only)
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	OP_HALFOPEN - For IMAP and NNTP names, open a connection but
	dont open a mailbox.
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	CL_EXPUNGE - Expunge mailbox automatically upon mailbox close
	(see also <function>imap_delete</function> and
	<function>imap_expunge</function>)
       </simpara>
      </listitem>
     </itemizedlist>
    </para>  
    <para>
     성공하면 &true;를 리턴하고 에러가 발생하면 &false;를 리턴한다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-subscribe">
   <refnamediv>
    <refname>imap_subscribe</refname>
    <refpurpose>메일 박스에 Subscribe한다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_subscribe</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>mbox</parameter></methodparam>
     </methodsynopsis>
    <para>  
     새로운 메일박스를 Subscribe한다.
    </para>
    <para>
     성공하면 &true;를 리턴하고 에러가 발생하면 &false;를 리턴한다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-undelete">
   <refnamediv>
    <refname>imap_undelete</refname> 
    <refpurpose>
     지움 표시된 메시지의 지움 표시를 제거한다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_undelete</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>int</type><parameter>msg_number</parameter></methodparam>
     </methodsynopsis>
    <para> 
     이함수는 특정 메시지의 지움 플래그(deletion flag)를 제거한다.
     여기서 특정 메시지는 <function>imap_delete</function>함수나
     <function>imap_mail_move</function>함수에 의해서 지움 표시된 메시지이다.
    </para>
    <para>
     성공하면 &true;를 리턴하고 에러가 발생하면 &false;를 리턴한다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-unsubscribe">
   <refnamediv>
    <refname>imap_unsubscribe</refname>
    <refpurpose>메일박스를 Unsubscribe한다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_unsubscribe</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>mbox</parameter></methodparam>
     </methodsynopsis>
    <para>  
     특정 메일박스에서 Unsubscribe한다.
    </para>
    <para>
     성공하면 &true;를 리턴하고 에러가 발생하면 &false;를 리턴한다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-qprint">
   <refnamediv>
    <refname>imap_qprint</refname>
    <refpurpose>quoted-printable 문자열을 8비트 문자열로 변환한다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>imap_qprint</methodname>
      <methodparam><type>string</type><parameter>string</parameter></methodparam>
     </methodsynopsis>
    <para>  
     quoted-printable 문자열을 8비트 문자열로 변환한다 .
     (<ulink url="&url.rfc;rfc2045.html">RFC2045</ulink>, section 6.7에 따라)
    </para>
    <para>
     8비트(binary) 문자열을 돌려준다.
    </para>
    <para>
     <function>imap_8bit</function>함수도 보시오.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-8bit">
   <refnamediv>
    <refname>imap_8bit</refname>
    <refpurpose>
     8비트 문자열을 quoted-printable 문자열로 변환한다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>imap_8bit</methodname>
      <methodparam><type>string</type><parameter>string</parameter></methodparam>
     </methodsynopsis>
    <para>  
     8비트 문자열을 quoted-printable 문자열로 변환한다.
     (<ulink url="&url.rfc;rfc2045.html">RFC2045</ulink>, section 6.7에 따라)
    </para>
    <para>
     quoted-printable 문자열을 돌려준다.
    </para>
    <para>
    <function>imap_qprint</function>함수도 보시오.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-binary">
   <refnamediv>
    <refname>imap_binary</refname>
    <refpurpose>
     8비트 문자열을 base64문자열로 변환한다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>imap_binary</methodname>
      <methodparam><type>string</type><parameter>string</parameter></methodparam>
     </methodsynopsis>
    <para>  
     8비트 문자열을 base64문자열로 변환한다.
     (<ulink url="&url.rfc;rfc2045.html">RFC2045</ulink>, Section 6.8에 따라)
    </para>
    <para>
     base64 문자열을 돌려준다.
    </para>
    <para>
     <function>imap_base64</function>도 보시오.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-scanmailbox">
   <refnamediv>
    <refname>imap_scanmailbox</refname>
    <refpurpose>
     메일박스의 텍스트중에서 검색 문자열을 갖는 메일박스의 목록을 읽어 온다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>imap_scanmailbox</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>ref</parameter></methodparam>
      <methodparam><type>string</type><parameter>pattern</parameter></methodparam>   
      <methodparam><type>string</type><parameter>content</parameter></methodparam>
     </methodsynopsis>
    <para>
     메일박스의 텍스트중에서 <parameter>string</parameter>의 문자열을
     갖는 메일박스 이름을 포함하는 배열을 돌려준다.
     이함수는 <function>imap_listmailbox</function>함수와 유사하다,
     단지 메일박스 데이터중에서 <parameter>content</parameter>문자열의
     존재를 체크하는 것만 추가되었다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-mailboxmsginfo">
   <refnamediv>
    <refname>imap_mailboxmsginfo</refname>
    <refpurpose>현재 메일박스에 관한 정보를 가져온다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>object</type><methodname>imap_mailboxmsginfo</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
     </methodsynopsis>
    <para>
     현재 메일박스에 관한 정보를 돌려준다. 실패하면 &false;를 리턴한다.
    </para> 
    <para> 
     <function>imap_mailboxmsginfo</function>함수는 서버에서 현재 메일박스의
     상태를 점검한다. 이 함수는 <function>imap_status</function>함수와 유사하다.
     단지 메일박스안의 모든 메시지 사이즈의 총량을 내는 것이 추가되었다.
     이것은 곧 총량을 내기위해 실행할 추가적인 시간이 걸린다는 것을 의미한다.
     다음 속성을 갖는 객체로 정보를 돌려준다.
    </para>
    <para>
     <table>
      <title>Mailbox properties</title>
      <tgroup cols="2">
       <tbody>
        <row>
	 <entry>Date</entry>
	 <entry>date of last change</entry>
	</row>
        <row>
	 <entry>Driver</entry>
	 <entry>driver</entry>
	</row>
        <row>
	 <entry>Mailbox</entry>
	 <entry>name of the mailbox</entry>
	</row>
        <row>
	 <entry>Nmsgs</entry>
	 <entry>number of messages</entry>
	</row>
        <row>
	 <entry>Recent</entry>
	 <entry>number of recent messages</entry>
	</row>
        <row>
	 <entry>Unread</entry>
	 <entry>number of unread messages</entry>
	</row>
        <row>
	 <entry>Deleted</entry>
	 <entry>number of deleted messages</entry>
	</row>
        <row>
	 <entry>Size</entry>
	 <entry>mailbox size</entry>
	</row>
       </tbody>
      </tgroup>
     </table>
    </para>
    <para>
     <example>
      <title><function>imap_mailboxmsginfo</function> example</title>
      <programlisting role="php">
&lt;?php

$mbox = imap_open("{your.imap.host}INBOX","username", "password")
      || die("can't connect: ".imap_last_error());
 
$check = imap_mailboxmsginfo($mbox);
 
if($check) {
    print "Date: "    . $check->Date    ."&lt;br>\n" ;
    print "Driver: "  . $check->Driver  ."&lt;br>\n" ;
    print "Mailbox: " . $check->Mailbox ."&lt;br>\n" ;
    print "Messages: ". $check->Nmsgs   ."&lt;br>\n" ;
    print "Recent: "  . $check->Recent  ."&lt;br>\n" ;
    print "Unread: "  . $check->Unread  ."&lt;br>\n" ;
    print "Deleted: " . $check->Deleted ."&lt;br>\n" ;
    print "Size: "    . $check->Size    ."&lt;br>\n" ;
} else {
    print "imap_check() failed: ".imap_last_error(). "&lt;br>\n";
}
 
imap_close($mbox);

?&gt;
      </programlisting>
     </example>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-rfc822-write-address">
   <refnamediv>
    <refname>imap_rfc822_write_address</refname>
    <refpurpose>
     주어진 메일박스, 호스트, 개인 정보로 적절히 형식화된 이메일 주소를 돌려준다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>imap_rfc822_write_address</methodname>
      <methodparam><type>string</type><parameter>mailbox</parameter></methodparam>
      <methodparam><type>string</type><parameter>host</parameter></methodparam>
      <methodparam><type>string</type><parameter>personal</parameter></methodparam>
     </methodsynopsis>
    <para>
     <ulink url="&url.rfc;rfc822.html">RFC822</ulink>문서에 정의된대로
     주어진 메일박스, 호스트, 개인 정보로 적절하게 형식화된 이메일 주소를
     돌려준다.
    </para>
    <para>
     <example>
      <title><function>imap_rfc822_write_address</function> example</title>
      <programlisting role="php">
print imap_rfc822_write_address("hartmut","cvs.php.net","Hartmut Holzgraefe")."\n";      
      </programlisting>
     </example>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-rfc822-parse-adrlist">
   <refnamediv>
    <refname>imap_rfc822_parse_adrlist</refname>
    <refpurpose>주소 문자열을 해석한다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>imap_rfc822_parse_adrlist</methodname>
      <methodparam><type>string</type><parameter>address</parameter></methodparam>
      <methodparam><type>string</type><parameter>default_host</parameter></methodparam>
     </methodsynopsis>
    <para>
     이 함수는 <ulink url="&url.rfc;rfc822.html">RFC822</ulink>문서에 정의된대로
     각 주소에 대해 주소 문자열을 해석하고 객체의 문자열을 돌려준다.
     객체의 속성은 다음과 같다:
    </para>
    <para>
     <itemizedlist>
      <listitem>
       <simpara>
        mailbox  - the mailbox name (username)
       </simpara>
      </listitem>
      <listitem>
       <simpara>
        host - the host name
       </simpara>
      </listitem>
      <listitem>
       <simpara>
        personal - the personal name
       </simpara>
      </listitem>
      <listitem>
       <simpara>
        adl - at domain source route
       </simpara>
      </listitem>
     </itemizedlist>
    </para>
    <para>
     <example>
      <title><function>imap_rfc822_parse_adrlist</function> example</title>
      <programlisting role="php">
$address_string = "Hartmut Holzgraefe &lt;hartmut@cvs.php.net>, postmaster@somedomain.net, root";
$address_array  = imap_rfc822_parse_adrlist($address_string,"somedomain.net");
if(! is_array($address_array)) die("somethings wrong\n");
 
reset($address_array);
while(list($key,$val)=each($address_array)){
  print "mailbox : ".$val->mailbox."&lt;br>\n";
  print "host    : ".$val->host."&lt;br>\n";
  print "personal: ".$val->personal."&lt;br>\n";
  print "adl     : ".$val->adl."&lt;p>\n";
} 
      </programlisting>
     </example>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-setflag-full">
   <refnamediv>
    <refname>imap_setflag_full</refname>
    <refpurpose>메시지에서 플래그(flags)를 셋(set)한다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>imap_setflag_full</methodname>
      <methodparam><type>int</type><parameter>stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>sequence</parameter></methodparam>
      <methodparam><type>string</type><parameter>flag</parameter></methodparam>
      <methodparam><type>string</type><parameter>options</parameter></methodparam>
     </methodsynopsis>
    <para>
     이 함수는 지정된 일련번호의 메시지에서 지정된 플래그(flag)에 
     플래그 셋(flags set)을 추가한다.
    </para>
    <para>
     셋(set)할 수 있는 플래그(flags)는 "\\Seen", "\\Answered", 
     "\\Flagged", "\\Deleted", "\\Draft", 과 "\\Recent"이다.
     (RFC2060 문서에 정의된대로)
    </para>
    <para>
     옵션은 다음에서 한개 이상의 비트마스트(bit mask)값이다:
     <informalexample>
      <literallayout>
ST_UID          The sequence argument contains UIDs instead of
                sequence numbers
      </literallayout>
     </informalexample>
    </para>
    <para>
     <example>
      <title><function>imap_setflag_full</function> example</title>
      <programlisting role="php">
$mbox = imap_open("{your.imap.host:143}","username","password")
     || die("can't connect: ".imap_last_error());
 
$status = imap_setflag_full($mbox,"2,5","\\Seen \\Flagged");
 
print gettype($status)."\n";
print $status."\n";
 
imap_close($mbox);
      </programlisting>
     </example>
    </para>                                                                                                 </refsect1>
  </refentry>

  <refentry id="function.imap-clearflag-full">
   <refnamediv>
    <refname>imap_clearflag_full</refname>
    <refpurpose>메시지에서 플래그(flags)를 클리어(clear)한다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>imap_clearflag_full</methodname>
      <methodparam><type>int</type><parameter>stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>sequence</parameter></methodparam>
      <methodparam><type>string</type><parameter>flag</parameter></methodparam>
      <methodparam><type>string</type><parameter>options</parameter></methodparam>
     </methodsynopsis>
    <para>
     This function causes a store to delete the specified flag to the
     flags set for the messages in the specified sequence.
     이 함수는 지정된 일련번호의 메시지에서 지정된 플래그(flag)에
     플래그 셋(flags set)을 제거한다.
     언셋(unset)할 수 있는 플래그(flags)는 "\\Seen", "\\Answered",
     "\\Flagged", "\\Deleted", "\\Draft", 과 "\\Recent"이다.
     (RFC2060 문서에 정의된대로)
    </para>
    <para>
     옵션은 다음의 한개 이상의 비트마스크(bit mask) 값이다:
     <informalexample>
      <literallayout>
ST_UID          The sequence argument contains UIDs instead of
                sequence numbers
      </literallayout>
     </informalexample>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-sort">
   <refnamediv>
    <refname>imap_sort</refname>
    <refpurpose>메시지 헤더의 배열을 정렬한다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>imap_sort</methodname>
      <methodparam><type>int</type><parameter>stream</parameter></methodparam>
      <methodparam><type>int</type><parameter>criteria</parameter></methodparam>
      <methodparam><type>int</type><parameter>reverse</parameter></methodparam>
      <methodparam><type>int</type><parameter>options</parameter></methodparam>
     </methodsynopsis>
    <para>
     주어진 인수로 정렬된 메시지 번호의 배열을 돌려준다.
    </para>
    <para>
     <parameter>Reverse</parameter>인수는 역정렬(reverse-sorting)하기 위해서는
     1의 값을 갖는다.
    </para>
    <para>
     기준(Criteria)은 다음중 하나(오직 하나)가 될 수 있다:
     <informalexample>
      <literallayout>
SORTDATE        message Date
SORTARRIVAL     arrival date
SORTFROM        mailbox in first From address
SORTSUBJECT     message Subject
SORTTO          mailbox in first To address 
SORTCC          mailbox in first cc address 
SORTSIZE        size of message in octets
      </literallayout>
     </informalexample>
    </para>
    <para>
     플래그(flags)는 다음중 하나이상의 비트마스크(bitmask)값이다:
     <informalexample>
      <literallayout>
SE_UID          Return UIDs instead of sequence numbers
SE_NOPREFETCH   Don't prefetch searched messages.
      </literallayout>
     </informalexample>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-fetchheader">
   <refnamediv>
    <refname>imap_fetchheader</refname>
    <refpurpose>메시지에서 헤더를 돌려준다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>imap_fetchheader</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>int</type><parameter>msgno</parameter></methodparam>
      <methodparam><type>int</type><parameter>flags</parameter></methodparam>
     </methodsynopsis>
    <para>
     이 함수는 지정된 메시지에서 전체의(complete), 필터링되지않은(unfiltered)
     <ulink url="&url.rfc;rfc822.html">RFC822</ulink>형식의 헤더를
     텍스트 문자열로 페치하고, 그 텍스트 문자열을 돌려준다.
    </para>
    <para>
     옵션은 다음과 같다:
     <informalexample>
      <literallayout>
FT_UID          The msgno argument is a UID 
FT_INTERNAL     The return string is in "internal" format,
                without any attempt to canonicalize to CRLF
                newlines
FT_PREFETCHTEXT The RFC822.TEXT should be pre-fetched at the
                same time.  This avoids an extra RTT on an
                IMAP connection if a full message text is
                desired (e.g. in a "save to local file"
                operation)
      </literallayout>
     </informalexample>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-uid">
   <refnamediv>
    <refname>imap_uid</refname>
    <refpurpose>
     이 함수는 주어진 메시지의 일련번호(sequence number)에 대한 UID를 돌려준다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_uid</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>int</type><parameter>msgno</parameter></methodparam>
     </methodsynopsis>
    <para>
     이 함수는 주어진 메시지 일련번호(sequence number)에 대한 UID를 돌려준다.
     UID는 메일박스의 내용이 변화될 때마다 바뀌는 메시지 일련번호에 반하여
     시간에 따라 바뀌지 않는 유일한 구별값(identifier)이다.
     이 함수는 <function>imap_msgno</function>함수의 반대이다.
    </para>
   </refsect1>
  </refentry>


  <refentry id="function.imap-msgno">
   <refnamediv>
    <refname>imap_msgno</refname>
    <refpurpose>
     이 함수는 주어진 UID값에 대해 메시지 일련번호(sequence number)을 넘겨준다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>imap_msgno</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>int</type><parameter>uid</parameter></methodparam>
     </methodsynopsis>
    <para>
    이 함수는 주어진 UID값에 대해 메시지 일련번호(sequence number)을 넘겨준다
    <function>imap_uid</function>함수의 반대이다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-search">
   <refnamediv>
    <refname>imap_search</refname>
    <refpurpose>
     이 함수는 주어진 검색 기준(criteria)에 부합되는 메시지의 배열을 돌려준다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>imap_search</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>criteria</parameter></methodparam>
      <methodparam><type>int</type><parameter>flags</parameter></methodparam>
     </methodsynopsis>
    <para>
     이 함수는 주어진 imap 스트림(stream)안의 현재 열려있는 메일박스에서
     검색을 수행한다. <parameter>criteria</parameter>인수는 문자열이다.
     공백(spaces)에 의해 구별(delimited)되고,아래의 키워드(keywords)가 허용된다.
     두 단어 이상의 변수(arguments) (예를 들면, FROM "joey smith" )는
     따옴표(quoted) 처리해야 한다.
     <itemizedlist>  
      <listitem>
       <simpara>
	ALL - return all messages matching the rest of the criteria
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	ANSWERED - match messages with the \\ANSWERED flag set
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	BCC "string" - match messages with "string" in the Bcc: field
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	BEFORE "date" - match messages with Date: before "date"
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	BODY "string" - match messages with "string" in the body of the message
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	CC "string" - match messages with "string" in the Cc: field
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	DELETED - match deleted messages
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	FLAGGED - match messages with the \\FLAGGED (sometimes
	referred to as Important or Urgent) flag set
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	FROM "string" - match messages with "string" in the From: field
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	KEYWORD "string" - match messages with "string" as a keyword
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	NEW - match new messages
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	OLD - match old messages
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	ON "date" - match messages with Date: matching "date"
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	RECENT - match messages with the \\RECENT flag set
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	SEEN - match messages that have been read (the \\SEEN flag is set)
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	SINCE "date" - match messages with Date: after "date"
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	SUBJECT "string" - match messages with "string" in the Subject:
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	TEXT "string" - match messages with text "string"
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	TO "string" - match messages with "string" in the To:
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	UNANSWERED - match messages that have not been answered
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	UNDELETED - match messages that are not deleted
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	UNFLAGGED - match messages that are not flagged
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	UNKEYWORD "string" - match messages that do not have the
	keyword "string"
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	UNSEEN - match messages which have not been read yet
       </simpara>
      </listitem>
     </itemizedlist>
    </para>
    <para>
     예를 들어 Mom으로 부터 받은 아직 읽지 않은 모든 메시지를 검색하려면,
     다음과 같이 하면 된다: "UNANSWERED FROM mom". 검색은 대소문자 구별을
     하지 않는 것처럼 보인다. 검색기준의 목록은 UW c-client source code에
     달려있어서 불완전하거나 부정확할 수 있다.
     (RFC2060, section 6.4.4 도 보시라).
    </para>
    <para>
     플래그(flags)에 대한 유효한 값은 SE_UID이다.
     이것은 메시지 일련번호(sequence number)대신에 UID를 포함하는
     배열을 돌려준다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-last-error">
   <refnamediv>
    <refname>imap_last_error</refname>
    <refpurpose>
     이 함수는 현재 페이지 요구(page request) 동안에 발생한
     IMAP 에러(물론 있다면)의 가장 나중것을 돌려준다 
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>imap_last_error</methodname>
      <void/>
     </methodsynopsis>
    <para>
     이 함수는 현재 페이지에서 발생한 가장 나중의 IMAP 에러 메시지를
     텍스트로 돌려준다; 에러 스택(error stack)은 건들지 않는다;
     아무 에러도 없는데, <function>imap_last_error</function>함수를 
     이어서 부르면 같은 에러를 돌려줄것이다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-errors">
   <refnamediv>
    <refname>imap_errors</refname>
    <refpurpose>
     이 함수는 현재 페이지 요구(page request)동안에, 또는
     에러 스택(error stack)이 리셋(reset)된 이후에 발생한 
     IMAP 에러(물론 있다면)를 모두 돌려준다 
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>imap_errors</methodname>
      <void/>
     </methodsynopsis>
    <para>
     이 함수는 가장 나중의 <function>imap_errors</function>함수의 호출
     이후, 또는 페이지의 시작때부터 발생한 모든 IMAP 에러 메시지들의 
     배열을 돌려준다.
     <function>imap_errors</function>함수가 호출되면, 에러 스택(error stack)
     은 즉시 클리어(clear)된다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-alerts">
   <refnamediv>
    <refname>imap_alerts</refname>
    <refpurpose>
     이 함수는 현재 페이지 요구(page request)동안이나,또는
     경고 스택(alert stack)이 리셋(reset)된 이후에 발생한 경고(alert)메시지
     (물론 있다면) 모두를 돌려준다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>imap_alerts</methodname>
      <void/>
     </methodsynopsis>
    <para>
     이 함수는 가장 나중의 <function>imap_alerts</function>함수의 호출
     이후, 또는 페이지의 시작때부터 발생한 모든 IMAP 경고 메시지들의
     배열을 돌려준다.
     <function>imap_alerts</function>함수가 호출되면, 경고 스택(alert stack)
     은 즉시 클리어(clear)된다. IMAP 사양에서는 이 메시지가 유저에게 넘겨질것을
     요구하는 바이다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-status">
   <refnamediv>
    <refname>imap_status</refname>
    <refpurpose>
     이 함수는 현재 메일박스 이외의 다른  메일 박스의 상태 정보를 돌려준다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>object</type><methodname>imap_status</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>mailbox</parameter></methodparam>
      <methodparam><type>int</type><parameter>options</parameter></methodparam>
     </methodsynopsis>
    <para>
     이 함수는 상태 정보를 포함하는 객체를 돌려준다.
     유효한 플래그(flags)는 다음과 같다:
     <itemizedlist>
      <listitem>
       <simpara>
	SA_MESSAGES - set status->messages to the number of messages
	in the mailbox
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	SA_RECENT - set status->recent to the number of recent
	messages in the mailbox
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	SA_UNSEEN - set status->unseen to the number of unseen (new)
	messages in the mailbox
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	SA_UIDNEXT - set status->uidnext to the next uid to be used in
	the mailbox
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	SA_UIDVALIDITY - set status->uidvalidity to a constant that
	changes when uids for the mailbox may no longer be valid
       </simpara>
      </listitem>
      <listitem>
       <simpara>
	SA_ALL - set all of the above
       </simpara>
      </listitem>
     </itemizedlist>
    </para>
    <para>
     status->flags is also set, which contains a bitmask which can be
     checked against any of the above constants.
    </para>
    <para>
     <example>
      <title><function>imap_status</function> example</title>
      <programlisting role="php">
$mbox = imap_open("{your.imap.host}","username","password",OP_HALFOPEN)
      || die("can't connect: ".imap_last_error());
 
$status = imap_status($mbox,"{your.imap.host}INBOX",SA_ALL);
if($status) {
  print("Messages:   ". $status->messages   )."&lt;br>\n";
  print("Recent:     ". $status->recent     )."&lt;br>\n";
  print("Unseen:     ". $status->unseen     )."&lt;br>\n";
  print("UIDnext:    ". $status->uidnext    )."&lt;br>\n";
  print("UIDvalidity:". $status->uidvalidity)."&lt;br>\n"; 
} else
  print "imap_status failed: ".imap_lasterror()."\n";
 
imap_close($mbox);
      </programlisting>
     </example>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-utf7-decode">
   <refnamediv>
    <refname>imap_utf7_decode</refname>
    <refpurpose>
     modified UTF-7 인코딩된 문자열을 디코딩한다.
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>imap_utf7_decode</methodname>
      <methodparam><type>string</type><parameter>text</parameter></methodparam>
     </methodsynopsis>
    <para>  
     modified UTF-7형식의 <parameter>text</parameter>를 
     8비트 데이터로 디코딩한다.
    </para>
    <para>
     디코딩된 8비트 데이터를 돌려주거나, 
     입력 문자열이 유효한 modified UTF-7이 아니면 &false;를 돌려준다.
     이 함수는 출력가능한 아스키(ASCII)코드 범위를 벗어난 국제적인 문자를
     갖는 메일박스 이름을 디코딩할 때 필요하다.
     modified UTF-7 인코딩은 <ulink 
     url="&url.rfc;rfc2060.html">RFC 2060</ulink> , section 5.1.3 문서에
     정의되어 있다( original UTF-7 은 <ulink
     url="&url.rfc;rfc1642.html">RFC1642</ulink>문서에 정의되어 있었다).
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-utf7-encode">
   <refnamediv>
    <refname>imap_utf7_encode</refname>
    <refpurpose>
     8비트 데이터를 UTF-7 텍스트로 변환한다.
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>imap_utf7_encode</methodname>
      <methodparam><type>string</type><parameter>data</parameter></methodparam>
     </methodsynopsis>
    <para>
     8비트 <parameter>data</parameter>를 modified UTF-7텍스트로
     변경한다. 이 함수는 출력가능한 아스키(ASCII)코드 범위를 벗어난
     국제적인 문자를 포함하는 메일박스 이름을 인코딩할 때 필요하다.
     modified UTF-7 인코딩은  <ulink
     url="&url.rfc;rfc2060.html">RFC 2060</ulink>, section 5.1.3문서에
     정의되어 있다.
     ( original UTF-7은  <ulink
     url="&url.rfc;rfc1642.html">RFC1642</ulink> 문서에 정의되어 있다).
    </para>
    <para>
     modified UTF-7 텍스트를 돌려준다.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-utf8">
   <refnamediv>
    <refname>imap_utf8</refname>
    <refpurpose>
      텍스트를 UTF8로 변환한다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>imap_utf8</methodname>
      <methodparam><type>string</type><parameter>text</parameter></methodparam>
     </methodsynopsis>
    <para>
     주어진 <parameter>text</parameter>값을 UTF8로 변환한다
     (<ulink url="&url.rfc;rfc2044.html">RFC2044</ulink>문서에 정의된대로).
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-fetch-overview">
   <refnamediv>
    <refname>imap_fetch_overview</refname>
    <refpurpose>
     주어진 메시지 헤더의 전체 정보를 읽어 온다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>imap_fetch_overview</methodname>
      <methodparam><type>int</type><parameter>imap_stream</parameter></methodparam>
      <methodparam><type>string</type><parameter>sequence</parameter></methodparam>
      <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
     </methodsynopsis>
    <para>
     이 함수는 주어진 <parameter>sequence</parameter>일련번호에 대한 헤더를
     페치하고, 전체 정보를 돌려준다. <parameter>sequence</parameter>값은
     <parameter>flags</parameter>가  FT_UID를 갖는다면
     UID나 메시지 인덱스(indices)의 일련번호(sequence)가 된다.
     돌려받는 값은 메시지 헤더의 각각을 서술하는 다음과 같은 속성을 갖는
     객체의 배열이다:
     <itemizedlist>
      <listitem>
       <simpara>
        subject - the messages subject
       </simpara>
      </listitem>
      <listitem>
       <simpara>
        from - who sent it
       </simpara>
      </listitem>
      <listitem>
       <simpara>
        date - when was it sent
       </simpara>
      </listitem>
      <listitem>
       <simpara>
        message_id - Message-ID 
       </simpara>
      </listitem>
      <listitem>
       <simpara>
        references - is a reference to this message id
       </simpara>
      </listitem>
      <listitem>
       <simpara>
        size - size in bytes
       </simpara>
      </listitem>
      <listitem>
       <simpara>
        uid - UID the message has in the mailbox
       </simpara>
      </listitem>
      <listitem>
       <simpara>
        msgno - message sequence number in the maibox
       </simpara>
      </listitem>
      <listitem>
       <simpara>
        recent - this message is flagged as recent
       </simpara>
      </listitem>
      <listitem>
       <simpara>
        flagged -  this message is flagged
       </simpara>
      </listitem>
      <listitem>
       <simpara>
        answered -  this message is flagged as answered
       </simpara>
      </listitem>
      <listitem>
       <simpara>
        deleted -  this message is flagged for deletion
       </simpara>
      </listitem>
      <listitem>
       <simpara>
        seen -  this message is flagged as already read
       </simpara>
      </listitem>
      <listitem>
       <simpara>
        draft -  this message is flagged as being a draft
       </simpara>
      </listitem>
     </itemizedlist>
    </para>
    <para>
     <example>
      <title><function>imap_fetch_overview</function> example</title>
      <programlisting role="php">
$mbox = imap_open("{your.imap.host:143}","username","password")
     || die("can't connect: ".imap_last_error());
 
$overview = imap_fetch_overview($mbox,"2,4:6",0);
 
if(is_array($overview)) {
        reset($overview);
        while( list($key,$val) = each($overview)) {
                print     $val->msgno
                . " - " . $val->date
                . " - " . $val->subject
                . "\n";
        }
}
 
imap_close($mbox);
      </programlisting>
     </example>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-mime-header-decode">
   <refnamediv>
    <refname>imap_mime_header_decode</refname>
    <refpurpose>MIME 헤더 구성요소(element)를 디코딩한다</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>imap_header_decode</methodname>
      <methodparam><type>string</type><parameter>text</parameter></methodparam>
     </methodsynopsis>
    <para>
     <function>imap_mime_header_decode</function>함수는 ASCII 텍스트가
     아닌 MIME 메시지 헤더 확장(MIME message header extensions)을 디코드한다.
     (<ulink url="&url.rfc;rfc2047.html">RFC2047</ulink>문서를 보라) 
     디코딩된 구성요소(elements)를  객체의 배열로 돌려준다.
     이 객체는 두가지 속성을 갖는다, 즉 "charset" 과 "text" 이다.
     구성요소가 인코딩되지 않았다면, 즉 평범한(plain) US-ASCII라면,
     그 구성요소의 "charset" 속성은 "default"값을 갖는다.
    </para>
    <para>
     <example>
      <title><function>imap_mime_header_decode</function> example</title>
      <programlisting role="php">
$text="=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= &lt;keld@dkuug.dk>";

$elements=imap_mime_header_decode($text);
for($i=0;$i&lt;count($elements);$i++) {
	echo "Charset: {$elements[$i]->charset}\n";
	echo "Text: {$elements[$i]->text}\n\n";
}

      </programlisting>
     </example>
    </para>
    <para>
     In the above example we would have two elements, whereas the first
     element had previously been encoded with ISO-8859-1, and the second
     element would be plain US-ASCII.
    </para>
   </refsect1>
  </refentry>
  
  <refentry id="function.imap-mail-compose">
   <refnamediv>
    <refname>imap_mail_compose</refname>
    <refpurpose>
     주어진 envelope와 body 섹션으로 구성된 MIME메시지를 만든다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>imap_mail_compose</methodname>
      <methodparam><type>array</type><parameter>envelope</parameter></methodparam>
      <methodparam><type>array</type><parameter>body</parameter></methodparam>
     </methodsynopsis>
    <para>
    </para>
    <para>
     <example>
      <title><function>imap_mail_compose</function> example</title>
      <programlisting role="php">
&lt;?php

$envelope["from"]="musone@afterfive.com";
$envelope["to"]="musone@darkstar";
$envelope["cc"]="musone@edgeglobal.com";

$part1["type"]=TYPEMULTIPART;
$part1["subtype"]="mixed";

$filename="/tmp/imap.c.gz";
$fp=fopen($filename,"r");
$contents=fread($fp,filesize($filename));
fclose($fp);

$part2["type"]=TYPEAPPLICATION;
$part2["encoding"]=ENCBINARY;
$part2["subtype"]="octet-stream";
$part2["description"]=basename($filename);
$part2["contents.data"]=$contents;

$part3["type"]=TYPETEXT;
$part3["subtype"]="plain";
$part3["description"]="description3";
$part3["contents.data"]="contents.data3\n\n\n\t";

$body[1]=$part1;
$body[2]=$part2;
$body[3]=$part3;

echo nl2br(imap_mail_compose($envelope,$body));

?&gt;
      </programlisting>
     </example>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.imap-mail">
   <refnamediv>
    <refname>imap_mail</refname>
    <refpurpose>
     이메일 메시지를 보낸다
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>imap_mail</methodname>
      <methodparam><type>string</type><parameter>to</parameter></methodparam>
      <methodparam><type>string</type><parameter>subject</parameter></methodparam>
      <methodparam><type>string</type><parameter>message</parameter></methodparam>
      <methodparam choice="opt"><type>string</type><parameter>additional_headers</parameter></methodparam>
      <methodparam choice="opt"><type>string</type><parameter>cc</parameter></methodparam>
      <methodparam choice="opt"><type>string</type><parameter>bcc</parameter></methodparam>
      <methodparam choice="opt"><type>string</type><parameter>rpath</parameter></methodparam>
     </methodsynopsis>
    <para>
     이 함수는 현재 PHP 3에서만 유효하다.
    </para>
   </refsect1>
  </refentry>

 </reference>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->