forked from JetBrains/phpstorm-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
imap.php
1772 lines (1666 loc) · 58 KB
/
imap.php
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
<?php
// Start of imap v.
/**
* (PHP 4, PHP 5)<br/>
* Open an IMAP stream to a mailbox
* @link http://php.net/manual/en/function.imap-open.php
* @param string $mailbox <p>
* A mailbox name consists of a server and a mailbox path on this server.
* The special name INBOX stands for the current users
* personal mailbox. Mailbox names that contain international characters
* besides those in the printable ASCII space have to be encoded width
* <b>imap_utf7_encode</b>.
* </p>
* <p>
* The server part, which is enclosed in '{' and '}', consists of the servers
* name or ip address, an optional port (prefixed by ':'), and an optional
* protocol specification (prefixed by '/').
* </p>
* <p>
* The server part is mandatory in all mailbox
* parameters.
* </p>
* <p>
* All names which start with { are remote names, and are
* in the form "{" remote_system_name [":" port] [flags] "}"
* [mailbox_name] where:
* remote_system_name - Internet domain name or
* bracketed IP address of server.
* @param string $username <p>
* The user name
* </p>
* @param string $password <p>
* The password associated with the <i>username</i>
* </p>
* @param int $options [optional] <p>
* The <i>options</i> are a bit mask with one or more of
* the following:
* <b>OP_READONLY</b> - Open mailbox read-only
* @param int $n_retries [optional] <p>
* Number of maximum connect attempts
* </p>
* @param array $params [optional] <p>
* Connection parameters, the following (string) keys maybe used
* to set one or more connection parameters:
* DISABLE_AUTHENTICATOR - Disable authentication properties
* @return resource an IMAP stream on success or <b>FALSE</b> on error.
*/
function imap_open ($mailbox, $username, $password, $options = 0, $n_retries = 0, array $params = null) {}
/**
* (PHP 4, PHP 5)<br/>
* Reopen IMAP stream to new mailbox
* @link http://php.net/manual/en/function.imap-reopen.php
* @param resource $imap_stream
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information
* </p>
* @param int $options [optional] <p>
* The <i>options</i> are a bit mask with one or more of
* the following:
* <b>OP_READONLY</b> - Open mailbox read-only
* @param int $n_retries [optional] <p>
* Number of maximum connect attempts
* </p>
* @return bool <b>TRUE</b> if the stream is reopened, <b>FALSE</b> otherwise.
*/
function imap_reopen ($imap_stream, $mailbox, $options = 0, $n_retries = 0) {}
/**
* (PHP 4, PHP 5)<br/>
* Close an IMAP stream
* @link http://php.net/manual/en/function.imap-close.php
* @param resource $imap_stream
* @param int $flag [optional] <p>
* If set to <b>CL_EXPUNGE</b>, the function will silently
* expunge the mailbox before closing, removing all messages marked for
* deletion. You can achieve the same thing by using
* <b>imap_expunge</b>
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_close ($imap_stream, $flag = 0) {}
/**
* (PHP 4, PHP 5)<br/>
* Gets the number of messages in the current mailbox
* @link http://php.net/manual/en/function.imap-num-msg.php
* @param resource $imap_stream
* @return int Return the number of messages in the current mailbox, as an integer.
*/
function imap_num_msg ($imap_stream) {}
/**
* (PHP 4, PHP 5)<br/>
* Gets the number of recent messages in current mailbox
* @link http://php.net/manual/en/function.imap-num-recent.php
* @param resource $imap_stream
* @return int the number of recent messages in the current mailbox, as an
* integer.
*/
function imap_num_recent ($imap_stream) {}
/**
* (PHP 4, PHP 5)<br/>
* Returns headers for all messages in a mailbox
* @link http://php.net/manual/en/function.imap-headers.php
* @param resource $imap_stream
* @return array an array of string formatted with header info. One
* element per mail message.
*/
function imap_headers ($imap_stream) {}
/**
* (PHP 4, PHP 5)<br/>
* Read the header of the message
* @link http://php.net/manual/en/function.imap-headerinfo.php
* @param resource $stream_id An IMAP stream returned by imap_open().
* @param int $msg_no The message number
* @param int $from_length [optional] Number of characters for the fetchfrom property. Must be greater than or equal to zero.
* @param int $subject_length [optional] Number of characters for the fetchsubject property Must be greater than or equal to zero.
* @param $default_host [optional]
* @return object Returns the information in an object with following properties:
* <dl>
* <dt>toaddress <dd>full to: line, up to 1024 characters
* <dt>to <dd>an array of objects from the To: line, with the following properties: personal, adl, mailbox, and host
* <dt>fromaddress <dd>full from: line, up to 1024 characters
* <dt>from <dd>an array of objects from the From: line, with the following properties: personal, adl, mailbox, and host
* <dt>ccaddress <dd>full cc: line, up to 1024 characters
* <dt>cc <dd>an array of objects from the Cc: line, with the following properties: personal, adl, mailbox, and host
* <dt>bccaddress <dd>full bcc: line, up to 1024 characters
* <dt>bcc <dd>an array of objects from the Bcc: line, with the following properties: personal, adl, mailbox, and host
* <dt>reply_toaddress <dd>full Reply-To: line, up to 1024 characters
* <dt>reply_to <dd>an array of objects from the Reply-To: line, with the following properties: personal, adl, mailbox, and host
* <dt>senderaddress <dd>full sender: line, up to 1024 characters
* <dt>sender <dd>an array of objects from the Sender: line, with the following properties: personal, adl, mailbox, and host
* <dt>return_pathaddress <dd>full Return-Path: line, up to 1024 characters
* <dt>return_path <dd>an array of objects from the Return-Path: line, with the following properties: personal, adl, mailbox, and host
* <dt>remail -
* <dt>date <dd>The message date as found in its headers
* <dt>Date <dd>Same as date
* <dt>subject <dd>The message subject
* <dt>Subject <dd>Same a subject
* <dt>in_reply_to -
* <dt>message_id -
* <dt>newsgroups -
* <dt>followup_to -
* <dt>references -
* <dt>Recent <dd>R if recent and seen, N if recent and not seen, ' ' if not recent.
* <dt>Unseen <dd>U if not seen AND not recent, ' ' if seen OR not seen and recent
* <dt>Flagged <dd>F if flagged, ' ' if not flagged
* <dt>Answered <dd>A if answered, ' ' if unanswered
* <dt>Deleted <dd>D if deleted, ' ' if not deleted
* <dt>Draft <dd>X if draft, ' ' if not draft
* <dt>Msgno <dd>The message number
* <dt>MailDate -
* <dt>Size <dd>The message size
* <dt>udate <dd>mail message date in Unix time
* <dt>fetchfrom <dd>from line formatted to fit fromlength characters
* <dt>fetchsubject <dd>subject line formatted to fit subjectlength characters
* </dl>
*/
function imap_headerinfo ($stream_id, $msg_no, $from_length = 0, $subject_length = 0, $default_host = null) {}
/**
* (PHP 4, PHP 5)<br/>
* Parse mail headers from a string
* @link http://php.net/manual/en/function.imap-rfc822-parse-headers.php
* @param string $headers <p>
* The parsed headers data
* </p>
* @param string $defaulthost [optional] <p>
* The default host name
* </p>
* @return object an object similar to the one returned by
* <b>imap_header</b>, except for the flags and other
* properties that come from the IMAP server.
*/
function imap_rfc822_parse_headers ($headers, $defaulthost = UNKNOWN) {}
/**
* (PHP 4, PHP 5)<br/>
* Returns a properly formatted email address given the mailbox, host, and personal info
* @link http://php.net/manual/en/function.imap-rfc822-write-address.php
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information
* </p>
* @param string $host <p>
* The email host part
* </p>
* @param string $personal <p>
* The name of the account owner
* </p>
* @return string a string properly formatted email address as defined in RFC2822.
*/
function imap_rfc822_write_address ($mailbox, $host, $personal) {}
/**
* (PHP 4, PHP 5)<br/>
* Parses an address string
* @link http://php.net/manual/en/function.imap-rfc822-parse-adrlist.php
* @param string $address <p>
* A string containing addresses
* </p>
* @param string $default_host <p>
* The default host name
* </p>
* @return array an array of objects. The objects properties are:
* </p>
* <p>
* mailbox - the mailbox name (username)
* host - the host name
* personal - the personal name
* adl - at domain source route
*/
function imap_rfc822_parse_adrlist ($address, $default_host) {}
/**
* (PHP 4, PHP 5)<br/>
* Read the message body
* @link http://php.net/manual/en/function.imap-body.php
* @param resource $imap_stream
* @param int $msg_number <p>
* The message number
* </p>
* @param int $options [optional] <p>
* The optional <i>options</i> are a bit mask
* with one or more of the following:
* <b>FT_UID</b> - The <i>msg_number</i> is a UID
* @return string the body of the specified message, as a string.
*/
function imap_body ($imap_stream, $msg_number, $options = 0) {}
/**
* (PHP 4, PHP 5)<br/>
* Read the structure of a specified body section of a specific message
* @link http://php.net/manual/en/function.imap-bodystruct.php
* @param resource $imap_stream
* @param int $msg_number <p>
* The message number
* </p>
* @param string $section <p>
* The body section to read
* </p>
* @return object the information in an object, for a detailed description
* of the object structure and properties see
* <b>imap_fetchstructure</b>.
*/
function imap_bodystruct ($imap_stream, $msg_number, $section) {}
/**
* (PHP 4, PHP 5)<br/>
* Fetch a particular section of the body of the message
* @link http://php.net/manual/en/function.imap-fetchbody.php
* @param resource $imap_stream
* @param int $msg_number <p>
* The message number
* </p>
* @param string $section <p>
* The part number. It is a string of integers delimited by period which
* index into a body part list as per the IMAP4 specification
* </p>
* @param int $options [optional] <p>
* A bitmask with one or more of the following:
* <b>FT_UID</b> - The <i>msg_number</i> is a UID
* @return string a particular section of the body of the specified messages as a
* text string.
*/
function imap_fetchbody ($imap_stream, $msg_number, $section, $options = 0) {}
/**
* (PHP 5 >= 5.3.6)<br/>
* Fetch MIME headers for a particular section of the message
* @link http://php.net/manual/en/function.imap-fetchmime.php
* @param resource $imap_stream
* @param int $msg_number <p>
* The message number
* </p>
* @param string $section <p>
* The part number. It is a string of integers delimited by period which
* index into a body part list as per the IMAP4 specification
* </p>
* @param int $options [optional] <p>
* A bitmask with one or more of the following:
* <b>FT_UID</b> - The <i>msg_number</i> is a UID
* @return string the MIME headers of a particular section of the body of the specified messages as a
* text string.
*/
function imap_fetchmime ($imap_stream, $msg_number, $section, $options = 0) {}
/**
* (PHP 5 >= 5.1.3)<br/>
* Save a specific body section to a file
* @link http://php.net/manual/en/function.imap-savebody.php
* @param resource $imap_stream
* @param mixed $file <p>
* The path to the saved file as a string, or a valid file descriptor
* returned by <b>fopen</b>.
* </p>
* @param int $msg_number <p>
* The message number
* </p>
* @param string $part_number [optional] <p>
* The part number. It is a string of integers delimited by period which
* index into a body part list as per the IMAP4 specification
* </p>
* @param int $options [optional] <p>
* A bitmask with one or more of the following:
* <b>FT_UID</b> - The <i>msg_number</i> is a UID
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_savebody ($imap_stream, $file, $msg_number, $part_number = "", $options = 0) {}
/**
* (PHP 4, PHP 5)<br/>
* Returns header for a message
* @link http://php.net/manual/en/function.imap-fetchheader.php
* @param resource $imap_stream
* @param int $msg_number <p>
* The message number
* </p>
* @param int $options [optional] <p>
* The possible <i>options</i> are:
* <b>FT_UID</b> - The <i>msgno</i>
* argument is a UID
* @return string the header of the specified message as a text string.
*/
function imap_fetchheader ($imap_stream, $msg_number, $options = 0) {}
/**
* (PHP 4, PHP 5)<br/>
* Read the structure of a particular message
* @link http://php.net/manual/en/function.imap-fetchstructure.php
* @param resource $imap_stream
* @param int $msg_number <p>
* The message number
* </p>
* @param int $options [optional] <p>
* This optional parameter only has a single option,
* <b>FT_UID</b>, which tells the function to treat the
* <i>msg_number</i> argument as a
* UID.
* </p>
* @return object an object includes the envelope, internal date, size, flags and
* body structure along with a similar object for each mime attachment. The
* structure of the returned objects is as follows:
* </p>
* <p>
* <table>
* Returned Objects for <b>imap_fetchstructure</b>
* <tr valign="top">
* <td>type</td>
* <td>Primary body type</td>
* </tr>
* <tr valign="top">
* <td>encoding</td>
* <td>Body transfer encoding</td>
* </tr>
* <tr valign="top">
* <td>ifsubtype</td>
* <td><b>TRUE</b> if there is a subtype string</td>
* </tr>
* <tr valign="top">
* <td>subtype</td>
* <td>MIME subtype</td>
* </tr>
* <tr valign="top">
* <td>ifdescription</td>
* <td><b>TRUE</b> if there is a description string</td>
* </tr>
* <tr valign="top">
* <td>description</td>
* <td>Content description string</td>
* </tr>
* <tr valign="top">
* <td>ifid</td>
* <td><b>TRUE</b> if there is an identification string</td>
* </tr>
* <tr valign="top">
* <td>id</td>
* <td>Identification string</td>
* </tr>
* <tr valign="top">
* <td>lines</td>
* <td>Number of lines</td>
* </tr>
* <tr valign="top">
* <td>bytes</td>
* <td>Number of bytes</td>
* </tr>
* <tr valign="top">
* <td>ifdisposition</td>
* <td><b>TRUE</b> if there is a disposition string</td>
* </tr>
* <tr valign="top">
* <td>disposition</td>
* <td>Disposition string</td>
* </tr>
* <tr valign="top">
* <td>ifdparameters</td>
* <td><b>TRUE</b> if the dparameters array exists</td>
* </tr>
* <tr valign="top">
* <td>dparameters</td>
* <td>An array of objects where each object has an
* "attribute" and a "value"
* property corresponding to the parameters on the
* Content-disposition MIME
* header.</td>
* </tr>
* <tr valign="top">
* <td>ifparameters</td>
* <td><b>TRUE</b> if the parameters array exists</td>
* </tr>
* <tr valign="top">
* <td>parameters</td>
* <td>An array of objects where each object has an
* "attribute" and a "value"
* property.</td>
* </tr>
* <tr valign="top">
* <td>parts</td>
* <td>An array of objects identical in structure to the top-level
* object, each of which corresponds to a MIME body
* part.</td>
* </tr>
* </table>
* </p>
* <p>
* <table>
* Primary body type (may vary with used library)
* <tr valign="top"><td>0</td><td>text</td></tr>
* <tr valign="top"><td>1</td><td>multipart</td></tr>
* <tr valign="top"><td>2</td><td>message</td></tr>
* <tr valign="top"><td>3</td><td>application</td></tr>
* <tr valign="top"><td>4</td><td>audio</td></tr>
* <tr valign="top"><td>5</td><td>image</td></tr>
* <tr valign="top"><td>6</td><td>video</td></tr>
* <tr valign="top"><td>7</td><td>other</td></tr>
* </table>
* </p>
* <p>
* <table>
* Transfer encodings (may vary with used library)
* <tr valign="top"><td>0</td><td>7BIT</td></tr>
* <tr valign="top"><td>1</td><td>8BIT</td></tr>
* <tr valign="top"><td>2</td><td>BINARY</td></tr>
* <tr valign="top"><td>3</td><td>BASE64</td></tr>
* <tr valign="top"><td>4</td><td>QUOTED-PRINTABLE</td></tr>
* <tr valign="top"><td>5</td><td>OTHER</td></tr>
* </table>
*/
function imap_fetchstructure ($imap_stream, $msg_number, $options = 0) {}
/**
* (PHP 5 >= 5.3.0)<br/>
* Clears IMAP cache
* @link http://php.net/manual/en/function.imap-gc.php
* @param resource $imap_stream
* @param int $caches <p>
* Specifies the cache to purge. It may one or a combination
* of the following constants:
* <b>IMAP_GC_ELT</b> (message cache elements),
* <b>IMAP_GC_ENV</b> (enveloppe and bodies),
* <b>IMAP_GC_TEXTS</b> (texts).
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_gc ($imap_stream, $caches) {}
/**
* (PHP 4, PHP 5)<br/>
* Delete all messages marked for deletion
* @link http://php.net/manual/en/function.imap-expunge.php
* @param resource $imap_stream
* @return bool <b>TRUE</b>.
*/
function imap_expunge ($imap_stream) {}
/**
* (PHP 4, PHP 5)<br/>
* Mark a message for deletion from current mailbox
* @link http://php.net/manual/en/function.imap-delete.php
* @param resource $imap_stream
* @param int $msg_number <p>
* The message number
* </p>
* @param int $options [optional] <p>
* You can set the <b>FT_UID</b> which tells the function
* to treat the <i>msg_number</i> argument as an
* UID.
* </p>
* @return bool <b>TRUE</b>.
*/
function imap_delete ($imap_stream, $msg_number, $options = 0) {}
/**
* (PHP 4, PHP 5)<br/>
* Unmark the message which is marked deleted
* @link http://php.net/manual/en/function.imap-undelete.php
* @param resource $imap_stream
* @param int $msg_number <p>
* The message number
* </p>
* @param int $flags [optional]
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_undelete ($imap_stream, $msg_number, $flags = 0) {}
/**
* (PHP 4, PHP 5)<br/>
* Check current mailbox
* @link http://php.net/manual/en/function.imap-check.php
* @param resource $imap_stream
* @return object the information in an object with following properties:
* <b>Date</b> - current system time formatted according to RFC2822
* <b>Driver</b> - protocol used to access this mailbox:
* POP3, IMAP, NNTP
* <b>Mailbox</b> - the mailbox name
* <b>Nmsgs</b> - number of messages in the mailbox
* <b>Recent</b> - number of recent messages in the mailbox
* </p>
* <p>
* Returns <b>FALSE</b> on failure.
*/
function imap_check ($imap_stream) {}
/**
* (PHP 4, PHP 5)<br/>
* Returns the list of mailboxes that matches the given text
* @link http://php.net/manual/en/function.imap-listscan.php
* @param resource $imap_stream
* @param string $ref <p>
* <i>ref</i> should normally be just the server
* specification as described in <b>imap_open</b>
* </p>
* @param string $pattern Specifies where in the mailbox hierarchy
* to start searching.</p>There are two special characters you can
* pass as part of the <i>pattern</i>:
* '*' and '%'.
* '*' means to return all mailboxes. If you pass
* <i>pattern</i> as '*', you will
* get a list of the entire mailbox hierarchy.
* '%'
* means to return the current level only.
* '%' as the <i>pattern</i>
* parameter will return only the top level
* mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory.</p>
* @param string $content <p>
* The searched string
* </p>
* @return array an array containing the names of the mailboxes that have
* <i>content</i> in the text of the mailbox.
*/
function imap_listscan ($imap_stream, $ref, $pattern, $content) {}
/**
* (PHP 4, PHP 5)<br/>
* Copy specified messages to a mailbox
* @link http://php.net/manual/en/function.imap-mail-copy.php
* @param resource $imap_stream
* @param string $msglist <p>
* <i>msglist</i> is a range not just message
* numbers (as described in RFC2060).
* </p>
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information
* </p>
* @param int $options [optional] <p>
* <i>options</i> is a bitmask of one or more of
* <b>CP_UID</b> - the sequence numbers contain UIDS
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_mail_copy ($imap_stream, $msglist, $mailbox, $options = 0) {}
/**
* (PHP 4, PHP 5)<br/>
* Move specified messages to a mailbox
* @link http://php.net/manual/en/function.imap-mail-move.php
* @param resource $imap_stream
* @param string $msglist <p>
* <i>msglist</i> is a range not just message numbers
* (as described in RFC2060).
* </p>
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information
* </p>
* @param int $options [optional] <p>
* <i>options</i> is a bitmask and may contain the single option:
* <b>CP_UID</b> - the sequence numbers contain UIDS
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_mail_move ($imap_stream, $msglist, $mailbox, $options = 0) {}
/**
* (PHP 4, PHP 5)<br/>
* Create a MIME message based on given envelope and body sections
* @link http://php.net/manual/en/function.imap-mail-compose.php
* @param array $envelope <p>
* An associative array of headers fields. Valid keys are: "remail",
* "return_path", "date", "from", "reply_to", "in_reply_to", "subject",
* "to", "cc", "bcc", "message_id" and "custom_headers" (which contains
* associative array of other headers).
* </p>
* @param array $body <p>
* An indexed array of bodies
* </p>
* <p>
* A body is an associative array which can consist of the following keys:
* "type", "encoding", "charset", "type.parameters", "subtype", "id",
* "description", "disposition.type", "disposition", "contents.data",
* "lines", "bytes" and "md5".
* </p>
* @return string the MIME message.
*/
function imap_mail_compose (array $envelope, array $body) {}
/**
* (PHP 4, PHP 5)<br/>
* Create a new mailbox
* @link http://php.net/manual/en/function.imap-createmailbox.php
* @param resource $imap_stream
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information. Names containing international characters should be
* encoded by <b>imap_utf7_encode</b>
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_createmailbox ($imap_stream, $mailbox) {}
/**
* (PHP 4, PHP 5)<br/>
* Rename an old mailbox to new mailbox
* @link http://php.net/manual/en/function.imap-renamemailbox.php
* @param resource $imap_stream
* @param string $old_mbox <p>
* The old mailbox name, see <b>imap_open</b> for more
* information
* </p>
* @param string $new_mbox <p>
* The new mailbox name, see <b>imap_open</b> for more
* information
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_renamemailbox ($imap_stream, $old_mbox, $new_mbox) {}
/**
* (PHP 4, PHP 5)<br/>
* Delete a mailbox
* @link http://php.net/manual/en/function.imap-deletemailbox.php
* @param resource $imap_stream
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_deletemailbox ($imap_stream, $mailbox) {}
/**
* (PHP 4, PHP 5)<br/>
* Subscribe to a mailbox
* @link http://php.net/manual/en/function.imap-subscribe.php
* @param resource $imap_stream
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_subscribe ($imap_stream, $mailbox) {}
/**
* (PHP 4, PHP 5)<br/>
* Unsubscribe from a mailbox
* @link http://php.net/manual/en/function.imap-unsubscribe.php
* @param resource $imap_stream
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_unsubscribe ($imap_stream, $mailbox) {}
/**
* (PHP 4, PHP 5)<br/>
* Append a string message to a specified mailbox
* @link http://php.net/manual/en/function.imap-append.php
* @param resource $imap_stream
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information
* </p>
* @param string $message <p>
* The message to be append, as a string
* </p>
* <p>
* When talking to the Cyrus IMAP server, you must use "\r\n" as
* your end-of-line terminator instead of "\n" or the operation will
* fail
* </p>
* @param string $options [optional] <p>
* If provided, the <i>options</i> will also be written
* to the <i>mailbox</i>
* </p>
* @param string $internal_date [optional] <p>
* If this parameter is set, it will set the INTERNALDATE on the appended message. The parameter should be a date string that conforms to the rfc2060 specifications for a date_time value.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_append ($imap_stream, $mailbox, $message, $options = null, $internal_date = null) {}
/**
* (PHP 4, PHP 5)<br/>
* Check if the IMAP stream is still active
* @link http://php.net/manual/en/function.imap-ping.php
* @param resource $imap_stream
* @return bool <b>TRUE</b> if the stream is still alive, <b>FALSE</b> otherwise.
*/
function imap_ping ($imap_stream) {}
/**
* (PHP 4, PHP 5)<br/>
* Decode BASE64 encoded text
* @link http://php.net/manual/en/function.imap-base64.php
* @param string $text <p>
* The encoded text
* </p>
* @return string the decoded message as a string.
*/
function imap_base64 ($text) {}
/**
* (PHP 4, PHP 5)<br/>
* Convert a quoted-printable string to an 8 bit string
* @link http://php.net/manual/en/function.imap-qprint.php
* @param string $string <p>
* A quoted-printable string
* </p>
* @return string an 8 bits string.
*/
function imap_qprint ($string) {}
/**
* (PHP 4, PHP 5)<br/>
* Convert an 8bit string to a quoted-printable string
* @link http://php.net/manual/en/function.imap-8bit.php
* @param string $string <p>
* The 8bit string to convert
* </p>
* @return string a quoted-printable string.
*/
function imap_8bit ($string) {}
/**
* (PHP 4, PHP 5)<br/>
* Convert an 8bit string to a base64 string
* @link http://php.net/manual/en/function.imap-binary.php
* @param string $string <p>
* The 8bit string
* </p>
* @return string a base64 encoded string.
*/
function imap_binary ($string) {}
/**
* (PHP 4, PHP 5)<br/>
* Converts MIME-encoded text to UTF-8
* @link http://php.net/manual/en/function.imap-utf8.php
* @param string $mime_encoded_text <p>
* A MIME encoded string. MIME encoding method and the UTF-8
* specification are described in RFC2047 and RFC2044 respectively.
* </p>
* @return string an UTF-8 encoded string.
*/
function imap_utf8 ($mime_encoded_text) {}
/**
* (PHP 4, PHP 5)<br/>
* Returns status information on a mailbox
* @link http://php.net/manual/en/function.imap-status.php
* @param resource $imap_stream
* @param string $mailbox <p>
* The mailbox name, see <b>imap_open</b> for more
* information
* </p>
* @param int $options <p>
* Valid flags are:
* <b>SA_MESSAGES</b> - set $status->messages to the
* number of messages in the mailbox
* @return object This function returns an object containing status information.
* The object has the following properties: messages,
* recent, unseen,
* uidnext, and uidvalidity.
* </p>
* <p>
* flags is also set, which contains a bitmask which can
* be checked against any of the above constants.
*/
function imap_status ($imap_stream, $mailbox, $options) {}
/**
* @param $stream_id
* @param $options
*/
function imap_status_current ($stream_id, $options) {}
/**
* (PHP 4, PHP 5)<br/>
* Get information about the current mailbox
* @link http://php.net/manual/en/function.imap-mailboxmsginfo.php
* @param resource $imap_stream
* @return object the information in an object with following properties:
* <table>
* Mailbox properties
* <tr valign="top">
* <td>Date</td>
* <td>date of last change (current datetime)</td>
* </tr>
* <tr valign="top">
* <td>Driver</td>
* <td>driver</td>
* </tr>
* <tr valign="top">
* <td>Mailbox</td>
* <td>name of the mailbox</td>
* </tr>
* <tr valign="top">
* <td>Nmsgs</td>
* <td>number of messages</td>
* </tr>
* <tr valign="top">
* <td>Recent</td>
* <td>number of recent messages</td>
* </tr>
* <tr valign="top">
* <td>Unread</td>
* <td>number of unread messages</td>
* </tr>
* <tr valign="top">
* <td>Deleted</td>
* <td>number of deleted messages</td>
* </tr>
* <tr valign="top">
* <td>Size</td>
* <td>mailbox size</td>
* </tr>
* </table>
* </p>
* <p>
* Returns <b>FALSE</b> on failure.
*/
function imap_mailboxmsginfo ($imap_stream) {}
/**
* (PHP 4, PHP 5)<br/>
* Sets flags on messages
* @link http://php.net/manual/en/function.imap-setflag-full.php
* @param resource $imap_stream
* @param string $sequence <p>
* A sequence of message numbers. You can enumerate desired messages
* with the X,Y syntax, or retrieve all messages
* within an interval with the X:Y syntax
* </p>
* @param string $flag <p>
* The flags which you can set are \Seen,
* \Answered, \Flagged,
* \Deleted, and \Draft as
* defined by RFC2060.
* </p>
* @param int $options [optional] <p>
* A bit mask that may contain the single option:
* <b>ST_UID</b> - The sequence argument contains UIDs
* instead of sequence numbers
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_setflag_full ($imap_stream, $sequence, $flag, $options = NIL) {}
/**
* (PHP 4, PHP 5)<br/>
* Clears flags on messages
* @link http://php.net/manual/en/function.imap-clearflag-full.php
* @param resource $imap_stream
* @param string $sequence <p>
* A sequence of message numbers. You can enumerate desired messages
* with the X,Y syntax, or retrieve all messages
* within an interval with the X:Y syntax
* </p>
* @param string $flag <p>
* The flags which you can unset are "\\Seen", "\\Answered", "\\Flagged",
* "\\Deleted", and "\\Draft" (as defined by RFC2060)
* </p>
* @param int $options [optional] <p>
* <i>options</i> are a bit mask and may contain
* the single option:
* <b>ST_UID</b> - The sequence argument contains UIDs
* instead of sequence numbers
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imap_clearflag_full ($imap_stream, $sequence, $flag, $options = 0) {}
/**
* (PHP 4, PHP 5)<br/>
* Gets and sort messages
* @link http://php.net/manual/en/function.imap-sort.php
* @param resource $imap_stream
* @param int $criteria <p>
* Criteria can be one (and only one) of the following:
* <b>SORTDATE</b> - message Date
* @param int $reverse <p>
* Set this to 1 for reverse sorting
* </p>
* @param int $options [optional] <p>
* The <i>options</i> are a bitmask of one or more of the
* following:
* <b>SE_UID</b> - Return UIDs instead of sequence numbers
* @param string $search_criteria [optional]
* @param string $charset [optional]
* @return array an array of message numbers sorted by the given
* parameters.
*/
function imap_sort ($imap_stream, $criteria, $reverse, $options = 0, $search_criteria = null, $charset = 'NIL') {}
/**
* (PHP 4, PHP 5)<br/>
* This function returns the UID for the given message sequence number
* @link http://php.net/manual/en/function.imap-uid.php
* @param resource $imap_stream
* @param int $msg_number <p>
* The message number.
* </p>
* @return int The UID of the given message.
*/
function imap_uid ($imap_stream, $msg_number) {}
/**
* (PHP 4, PHP 5)<br/>
* Gets the message sequence number for the given UID
* @link http://php.net/manual/en/function.imap-msgno.php
* @param resource $imap_stream
* @param int $uid <p>
* The message UID
* </p>
* @return int the message sequence number for the given
* <i>uid</i>.
*/
function imap_msgno ($imap_stream, $uid) {}
/**
* (PHP 4, PHP 5)<br/>
* Read the list of mailboxes
* @link http://php.net/manual/en/function.imap-list.php
* @param resource $imap_stream
* @param string $ref <p>
* <i>ref</i> should normally be just the server
* specification as described in <b>imap_open</b>.
* </p>
* @param string $pattern Specifies where in the mailbox hierarchy
* to start searching.</p>There are two special characters you can
* pass as part of the <i>pattern</i>:
* '*' and '%'.
* '*' means to return all mailboxes. If you pass
* <i>pattern</i> as '*', you will
* get a list of the entire mailbox hierarchy.
* '%'
* means to return the current level only.
* '%' as the <i>pattern</i>
* parameter will return only the top level
* mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory.</p>
* @return array an array containing the names of the mailboxes.
*/
function imap_list ($imap_stream, $ref, $pattern) {}
/**
* (PHP 4, PHP 5)<br/>
* List all the subscribed mailboxes
* @link http://php.net/manual/en/function.imap-lsub.php
* @param resource $imap_stream
* @param string $ref <p>
* <i>ref</i> should normally be just the server
* specification as described in <b>imap_open</b>
* </p>
* @param string $pattern Specifies where in the mailbox hierarchy
* to start searching.</p>There are two special characters you can
* pass as part of the <i>pattern</i>:
* '*' and '%'.
* '*' means to return all mailboxes. If you pass
* <i>pattern</i> as '*', you will
* get a list of the entire mailbox hierarchy.
* '%'
* means to return the current level only.
* '%' as the <i>pattern</i>