| @@ -1,1603 +1,0 @@ | ||
| 1 | -<?php | |
| 2 | - | |
| 3 | -/* | |
| 4 | - * This file is part of the PHP IMAP2 package. | |
| 5 | - * | |
| 6 | - * (c) Francesco Bianco <[email protected]> | |
| 7 | - * | |
| 8 | - * For the full copyright and license information, please view the LICENSE | |
| 9 | - * file that was distributed with this source code. | |
| 10 | - */ | |
| 11 | - | |
| 12 | -use AcyMailing\Libraries\Imap2\Connection; | |
| 13 | -use AcyMailing\Libraries\Imap2\Errors; | |
| 14 | -use AcyMailing\Libraries\Imap2\Mail; | |
| 15 | -use AcyMailing\Libraries\Imap2\Mailbox; | |
| 16 | -use AcyMailing\Libraries\Imap2\Message; | |
| 17 | -use AcyMailing\Libraries\Imap2\Thread; | |
| 18 | -use AcyMailing\Libraries\Imap2\Polyfill; | |
| 19 | -use AcyMailing\Libraries\Imap2\Timeout; | |
| 20 | -use AcyMailing\Libraries\Imap2\Functions; | |
| 21 | - | |
| 22 | -define('IMAP2_CHARSET', 'UTF-8'); | |
| 23 | -define('IMAP2_RETROFIT_MODE', function_exists('imap_open')); | |
| 24 | - | |
| 25 | -if (!defined('NIL')) { | |
| 26 | - define('NIL', 0); | |
| 27 | -} | |
| 28 | -if (!defined('OP_DEBUG')) { | |
| 29 | - define('OP_DEBUG', 1); | |
| 30 | -} | |
| 31 | -if (!defined('OP_READONLY')) { | |
| 32 | - define('OP_READONLY', 2); | |
| 33 | -} | |
| 34 | -if (!defined('OP_ANONYMOUS')) { | |
| 35 | - define('OP_ANONYMOUS', 4); | |
| 36 | -} | |
| 37 | -if (!defined('OP_SHORTCACHE')) { | |
| 38 | - define('OP_SHORTCACHE', 8); | |
| 39 | -} | |
| 40 | -if (!defined('OP_SILENT')) { | |
| 41 | - define('OP_SILENT', 16); | |
| 42 | -} | |
| 43 | -if (!defined('OP_PROTOTYPE')) { | |
| 44 | - define('OP_PROTOTYPE', 32); | |
| 45 | -} | |
| 46 | -if (!defined('OP_HALFOPEN')) { | |
| 47 | - define('OP_HALFOPEN', 64); | |
| 48 | -} | |
| 49 | -if (!defined('OP_EXPUNGE')) { | |
| 50 | - define('OP_EXPUNGE', 128); | |
| 51 | -} | |
| 52 | -if (!defined('OP_SECURE')) { | |
| 53 | - define('OP_SECURE', 256); | |
| 54 | -} | |
| 55 | -if (!defined('OP_XOAUTH2')) { | |
| 56 | - define('OP_XOAUTH2', 512); | |
| 57 | -} | |
| 58 | -if (!defined('CL_EXPUNGE')) { | |
| 59 | - define('CL_EXPUNGE', 32768); | |
| 60 | -} | |
| 61 | -if (!defined('FT_UID')) { | |
| 62 | - define('FT_UID', 1); | |
| 63 | -} | |
| 64 | -if (!defined('FT_PEEK')) { | |
| 65 | - define('FT_PEEK', 2); | |
| 66 | -} | |
| 67 | -if (!defined('FT_NOT')) { | |
| 68 | - define('FT_NOT', 4); | |
| 69 | -} | |
| 70 | -if (!defined('FT_INTERNAL')) { | |
| 71 | - define('FT_INTERNAL', 8); | |
| 72 | -} | |
| 73 | -if (!defined('FT_PREFETCHTEXT')) { | |
| 74 | - define('FT_PREFETCHTEXT', 32); | |
| 75 | -} | |
| 76 | -if (!defined('ST_UID')) { | |
| 77 | - define('ST_UID', 1); | |
| 78 | -} | |
| 79 | -if (!defined('ST_SILENT')) { | |
| 80 | - define('ST_SILENT', 2); | |
| 81 | -} | |
| 82 | -if (!defined('ST_SET')) { | |
| 83 | - define('ST_SET', 4); | |
| 84 | -} | |
| 85 | -if (!defined('CP_UID')) { | |
| 86 | - define('CP_UID', 1); | |
| 87 | -} | |
| 88 | -if (!defined('CP_MOVE')) { | |
| 89 | - define('CP_MOVE', 2); | |
| 90 | -} | |
| 91 | -if (!defined('SE_UID')) { | |
| 92 | - define('SE_UID', 1); | |
| 93 | -} | |
| 94 | -if (!defined('SE_FREE')) { | |
| 95 | - define('SE_FREE', 2); | |
| 96 | -} | |
| 97 | -if (!defined('SE_NOPREFETCH')) { | |
| 98 | - define('SE_NOPREFETCH', 4); | |
| 99 | -} | |
| 100 | -if (!defined('SO_FREE')) { | |
| 101 | - define('SO_FREE', 8); | |
| 102 | -} | |
| 103 | -if (!defined('SO_NOSERVER')) { | |
| 104 | - define('SO_NOSERVER', 16); | |
| 105 | -} | |
| 106 | -if (!defined('SA_MESSAGES')) { | |
| 107 | - define('SA_MESSAGES', 1); | |
| 108 | -} | |
| 109 | -if (!defined('SA_RECENT')) { | |
| 110 | - define('SA_RECENT', 2); | |
| 111 | -} | |
| 112 | -if (!defined('SA_UNSEEN')) { | |
| 113 | - define('SA_UNSEEN', 4); | |
| 114 | -} | |
| 115 | -if (!defined('SA_UIDNEXT')) { | |
| 116 | - define('SA_UIDNEXT', 8); | |
| 117 | -} | |
| 118 | -if (!defined('SA_UIDVALIDITY')) { | |
| 119 | - define('SA_UIDVALIDITY', 16); | |
| 120 | -} | |
| 121 | -if (!defined('SA_ALL')) { | |
| 122 | - define('SA_ALL', 31); | |
| 123 | -} | |
| 124 | -if (!defined('LATT_NOINFERIORS')) { | |
| 125 | - define('LATT_NOINFERIORS', 1); | |
| 126 | -} | |
| 127 | -if (!defined('LATT_NOSELECT')) { | |
| 128 | - define('LATT_NOSELECT', 2); | |
| 129 | -} | |
| 130 | -if (!defined('LATT_MARKED')) { | |
| 131 | - define('LATT_MARKED', 4); | |
| 132 | -} | |
| 133 | -if (!defined('LATT_UNMARKED')) { | |
| 134 | - define('LATT_UNMARKED', 8); | |
| 135 | -} | |
| 136 | -if (!defined('LATT_REFERRAL')) { | |
| 137 | - define('LATT_REFERRAL', 16); | |
| 138 | -} | |
| 139 | -if (!defined('LATT_HASCHILDREN')) { | |
| 140 | - define('LATT_HASCHILDREN', 32); | |
| 141 | -} | |
| 142 | -if (!defined('LATT_HASNOCHILDREN')) { | |
| 143 | - define('LATT_HASNOCHILDREN', 64); | |
| 144 | -} | |
| 145 | -if (!defined('SORTDATE')) { | |
| 146 | - define('SORTDATE', 0); | |
| 147 | -} | |
| 148 | -if (!defined('SORTARRIVAL')) { | |
| 149 | - define('SORTARRIVAL', 1); | |
| 150 | -} | |
| 151 | -if (!defined('SORTFROM')) { | |
| 152 | - define('SORTFROM', 2); | |
| 153 | -} | |
| 154 | -if (!defined('SORTSUBJECT')) { | |
| 155 | - define('SORTSUBJECT', 3); | |
| 156 | -} | |
| 157 | -if (!defined('SORTTO')) { | |
| 158 | - define('SORTTO', 4); | |
| 159 | -} | |
| 160 | -if (!defined('SORTCC')) { | |
| 161 | - define('SORTCC', 5); | |
| 162 | -} | |
| 163 | -if (!defined('SORTSIZE')) { | |
| 164 | - define('SORTSIZE', 6); | |
| 165 | -} | |
| 166 | -if (!defined('TYPETEXT')) { | |
| 167 | - define('TYPETEXT', 0); | |
| 168 | -} | |
| 169 | -if (!defined('TYPEMULTIPART')) { | |
| 170 | - define('TYPEMULTIPART', 1); | |
| 171 | -} | |
| 172 | -if (!defined('TYPEMESSAGE')) { | |
| 173 | - define('TYPEMESSAGE', 2); | |
| 174 | -} | |
| 175 | -if (!defined('TYPEAPPLICATION')) { | |
| 176 | - define('TYPEAPPLICATION', 3); | |
| 177 | -} | |
| 178 | -if (!defined('TYPEAUDIO')) { | |
| 179 | - define('TYPEAUDIO', 4); | |
| 180 | -} | |
| 181 | -if (!defined('TYPEIMAGE')) { | |
| 182 | - define('TYPEIMAGE', 5); | |
| 183 | -} | |
| 184 | -if (!defined('TYPEVIDEO')) { | |
| 185 | - define('TYPEVIDEO', 6); | |
| 186 | -} | |
| 187 | -if (!defined('TYPEMODEL')) { | |
| 188 | - define('TYPEMODEL', 7); | |
| 189 | -} | |
| 190 | -if (!defined('TYPEOTHER')) { | |
| 191 | - define('TYPEOTHER', 8); | |
| 192 | -} | |
| 193 | -if (!defined('ENC7BIT')) { | |
| 194 | - define('ENC7BIT', 0); | |
| 195 | -} | |
| 196 | -if (!defined('ENC8BIT')) { | |
| 197 | - define('ENC8BIT', 1); | |
| 198 | -} | |
| 199 | -if (!defined('ENCBINARY')) { | |
| 200 | - define('ENCBINARY', 2); | |
| 201 | -} | |
| 202 | -if (!defined('ENCBASE64')) { | |
| 203 | - define('ENCBASE64', 3); | |
| 204 | -} | |
| 205 | -if (!defined('ENCQUOTEDPRINTABLE')) { | |
| 206 | - define('ENCQUOTEDPRINTABLE', 4); | |
| 207 | -} | |
| 208 | -if (!defined('ENCOTHER')) { | |
| 209 | - define('ENCOTHER', 5); | |
| 210 | -} | |
| 211 | -if (!defined('IMAP_OPENTIMEOUT')) { | |
| 212 | - define('IMAP_OPENTIMEOUT', 1); | |
| 213 | -} | |
| 214 | -if (!defined('IMAP_READTIMEOUT')) { | |
| 215 | - define('IMAP_READTIMEOUT', 2); | |
| 216 | -} | |
| 217 | -if (!defined('IMAP_WRITETIMEOUT')) { | |
| 218 | - define('IMAP_WRITETIMEOUT', 3); | |
| 219 | -} | |
| 220 | -if (!defined('IMAP_CLOSETIMEOUT')) { | |
| 221 | - define('IMAP_CLOSETIMEOUT', 4); | |
| 222 | -} | |
| 223 | -if (!defined('IMAP_GC_ELT')) { | |
| 224 | - define('IMAP_GC_ELT', 1); | |
| 225 | -} | |
| 226 | -if (!defined('IMAP_GC_ENV')) { | |
| 227 | - define('IMAP_GC_ENV', 2); | |
| 228 | -} | |
| 229 | -if (!defined('IMAP_GC_TEXTS')) { | |
| 230 | - define('IMAP_GC_TEXTS', 4); | |
| 231 | -} | |
| 232 | - | |
| 233 | -/** | |
| 234 | - * imap2_open | |
| 235 | - */ | |
| 236 | -if (!function_exists('imap_open')) { | |
| 237 | - /** @codeCoverageIgnore */ | |
| 238 | - function imap_open($mailbox, $user, $password, $flags = 0, $retries = 0, $options = []) | |
| 239 | - { | |
| 240 | - return imap2_open($mailbox, $user, $password, $flags, $retries, $options); | |
| 241 | - } | |
| 242 | -} | |
| 243 | -if (!function_exists('imap2_open')) { | |
| 244 | - function imap2_open($mailbox, $user, $password, $flags = 0, $retries = 0, $options = []) | |
| 245 | - { | |
| 246 | - if (IMAP2_RETROFIT_MODE && !($flags & OP_XOAUTH2)) { | |
| 247 | - return imap_open($mailbox, $user, $password, $flags, $retries, $options); | |
| 248 | - } | |
| 249 | - | |
| 250 | - return Connection::open($mailbox, $user, $password, $flags, $retries, $options); | |
| 251 | - } | |
| 252 | -} | |
| 253 | - | |
| 254 | -/** | |
| 255 | - * imap2_reopen | |
| 256 | - */ | |
| 257 | -if (!function_exists('imap_reopen')) { | |
| 258 | - /** @codeCoverageIgnore */ | |
| 259 | - function imap_reopen($imap, $mailbox, $flags = 0, $retries = 0) | |
| 260 | - { | |
| 261 | - return imap2_reopen($imap, $mailbox, $flags, $retries); | |
| 262 | - } | |
| 263 | -} | |
| 264 | -if (!function_exists('imap2_reopen')) { | |
| 265 | - function imap2_reopen($imap, $mailbox, $flags = 0, $retries = 0) | |
| 266 | - { | |
| 267 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 268 | - return imap_reopen($imap, $mailbox, $flags, $retries); | |
| 269 | - } | |
| 270 | - | |
| 271 | - return Connection::reopen($imap, $mailbox, $flags, $retries); | |
| 272 | - } | |
| 273 | -} | |
| 274 | - | |
| 275 | -/** | |
| 276 | - * imap2_ping | |
| 277 | - */ | |
| 278 | -if (!function_exists('imap_ping')) { | |
| 279 | - /** @codeCoverageIgnore */ | |
| 280 | - function imap_ping($imap) | |
| 281 | - { | |
| 282 | - return Connection::ping($imap); | |
| 283 | - } | |
| 284 | -} | |
| 285 | -if (!function_exists('imap2_ping')) { | |
| 286 | - function imap2_ping($imap) | |
| 287 | - { | |
| 288 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 289 | - return imap_ping($imap); | |
| 290 | - } | |
| 291 | - | |
| 292 | - return Connection::ping($imap); | |
| 293 | - } | |
| 294 | -} | |
| 295 | - | |
| 296 | -/** | |
| 297 | - * imap2_close | |
| 298 | - */ | |
| 299 | -if (!function_exists('imap_close')) { | |
| 300 | - /** @codeCoverageIgnore */ | |
| 301 | - function imap_close($imap, $flags = 0) | |
| 302 | - { | |
| 303 | - return Connection::close($imap, $flags); | |
| 304 | - } | |
| 305 | -} | |
| 306 | -if (!function_exists('imap2_close')) { | |
| 307 | - function imap2_close($imap, $flags = 0) | |
| 308 | - { | |
| 309 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 310 | - return imap_close($imap, $flags); | |
| 311 | - } | |
| 312 | - | |
| 313 | - return Connection::close($imap, $flags); | |
| 314 | - } | |
| 315 | -} | |
| 316 | - | |
| 317 | -/** | |
| 318 | - * imap2_timeout | |
| 319 | - */ | |
| 320 | -if (!function_exists('imap_timeout')) { | |
| 321 | - /** @codeCoverageIgnore */ | |
| 322 | - function imap_timeout($timeoutType, $timeout = -1) | |
| 323 | - { | |
| 324 | - return imap2_timeout($timeoutType, $timeout); | |
| 325 | - } | |
| 326 | -} | |
| 327 | -if (!function_exists('imap2_timeout')) { | |
| 328 | - function imap2_timeout($timeoutType, $timeout = -1) | |
| 329 | - { | |
| 330 | - if (IMAP2_RETROFIT_MODE) { | |
| 331 | - imap_timeout($timeoutType, $timeout); | |
| 332 | - } | |
| 333 | - | |
| 334 | - return Timeout::set($timeoutType, $timeout); | |
| 335 | - } | |
| 336 | -} | |
| 337 | - | |
| 338 | -/** | |
| 339 | - * imap2_check | |
| 340 | - */ | |
| 341 | -if (!function_exists('imap_check')) { | |
| 342 | - function imap_check($imap) | |
| 343 | - { | |
| 344 | - return Mailbox::check($imap); | |
| 345 | - } | |
| 346 | -} | |
| 347 | -if (!function_exists('imap2_check')) { | |
| 348 | - function imap2_check($imap) | |
| 349 | - { | |
| 350 | - return Mailbox::check($imap); | |
| 351 | - } | |
| 352 | -} | |
| 353 | - | |
| 354 | -/** | |
| 355 | - * imap2_status | |
| 356 | - */ | |
| 357 | -if (!function_exists('imap_status')) { | |
| 358 | - function imap_status($imap, $mailbox, $flags) | |
| 359 | - { | |
| 360 | - return imap2_status($imap, $mailbox, $flags); | |
| 361 | - } | |
| 362 | -} | |
| 363 | -if (!function_exists('imap2_status')) { | |
| 364 | - function imap2_status($imap, $mailbox, $flags) | |
| 365 | - { | |
| 366 | - if (IMAP2_RETROFIT_MODE && Functions::isRetrofitResource($imap)) { | |
| 367 | - return imap_status($imap, $mailbox, $flags); | |
| 368 | - } | |
| 369 | - | |
| 370 | - return Mailbox::status($imap, $mailbox, $flags); | |
| 371 | - } | |
| 372 | -} | |
| 373 | - | |
| 374 | -/** | |
| 375 | - * imap2_num_msg | |
| 376 | - */ | |
| 377 | -if (!function_exists('imap_num_msg')) { | |
| 378 | - /** @codeCoverageIgnore */ | |
| 379 | - function imap_num_msg($imap) | |
| 380 | - { | |
| 381 | - return imap2_num_msg($imap); | |
| 382 | - } | |
| 383 | -} | |
| 384 | -if (!function_exists('imap2_num_msg')) { | |
| 385 | - function imap2_num_msg($imap) | |
| 386 | - { | |
| 387 | - if (IMAP2_RETROFIT_MODE && Functions::isRetrofitResource($imap)) { | |
| 388 | - return imap_num_msg($imap); | |
| 389 | - } | |
| 390 | - | |
| 391 | - return Mailbox::numMsg($imap); | |
| 392 | - } | |
| 393 | -} | |
| 394 | - | |
| 395 | -/** | |
| 396 | - * imap2_num_recent | |
| 397 | - */ | |
| 398 | -if (!function_exists('imap_num_recent')) { | |
| 399 | - function imap_num_recent($imap) | |
| 400 | - { | |
| 401 | - return imap2_num_recent($imap); | |
| 402 | - } | |
| 403 | -} | |
| 404 | -if (!function_exists('imap2_num_recent')) { | |
| 405 | - function imap2_num_recent($imap) | |
| 406 | - { | |
| 407 | - if (IMAP2_RETROFIT_MODE && Functions::isRetrofitResource($imap)) { | |
| 408 | - return imap_num_recent($imap); | |
| 409 | - } | |
| 410 | - | |
| 411 | - return Mailbox::numRecent($imap); | |
| 412 | - } | |
| 413 | -} | |
| 414 | - | |
| 415 | -/** | |
| 416 | - * imap2_list | |
| 417 | - */ | |
| 418 | -if (!function_exists('imap_list')) { | |
| 419 | - /** @codeCoverageIgnore */ | |
| 420 | - function imap_list($imap, $reference, $pattern) | |
| 421 | - { | |
| 422 | - return imap2_list($imap, $reference, $pattern); | |
| 423 | - } | |
| 424 | -} | |
| 425 | -if (!function_exists('imap2_list')) { | |
| 426 | - function imap2_list($imap, $reference, $pattern) | |
| 427 | - { | |
| 428 | - return Mailbox::list($imap, $reference, $pattern); | |
| 429 | - } | |
| 430 | -} | |
| 431 | - | |
| 432 | -/** | |
| 433 | - * imap2_listmailbox | |
| 434 | - */ | |
| 435 | -if (!function_exists('imap_listmailbox')) { | |
| 436 | - /** @codeCoverageIgnore */ | |
| 437 | - function imap_listmailbox($imap, $reference, $pattern) | |
| 438 | - { | |
| 439 | - return imap2_listmailbox($imap, $reference, $pattern); | |
| 440 | - } | |
| 441 | -} | |
| 442 | -if (!function_exists('imap2_listmailbox')) { | |
| 443 | - function imap2_listmailbox($imap, $reference, $pattern) | |
| 444 | - { | |
| 445 | - return Mailbox::list($imap, $reference, $pattern); | |
| 446 | - } | |
| 447 | -} | |
| 448 | - | |
| 449 | -/** | |
| 450 | - * imap2_listscan | |
| 451 | - */ | |
| 452 | -if (!function_exists('imap_listscan')) { | |
| 453 | - /** @codeCoverageIgnore */ | |
| 454 | - function imap_listscan($imap, $reference, $pattern, $content) | |
| 455 | - { | |
| 456 | - return imap2_listscan($imap, $reference, $pattern, $content); | |
| 457 | - } | |
| 458 | -} | |
| 459 | -if (!function_exists('imap2_listscan')) { | |
| 460 | - function imap2_listscan($imap, $reference, $pattern, $content) | |
| 461 | - { | |
| 462 | - return Mailbox::listScan($imap, $reference, $pattern, $content); | |
| 463 | - } | |
| 464 | -} | |
| 465 | - | |
| 466 | -/** | |
| 467 | - * imap2_scan | |
| 468 | - */ | |
| 469 | -if (!function_exists('imap_scan')) { | |
| 470 | - /** @codeCoverageIgnore */ | |
| 471 | - function imap_scan($imap, $reference, $pattern, $content) | |
| 472 | - { | |
| 473 | - return imap2_scan($imap, $reference, $pattern, $content); | |
| 474 | - } | |
| 475 | -} | |
| 476 | -if (!function_exists('imap2_scan')) { | |
| 477 | - function imap2_scan($imap, $reference, $pattern, $content) | |
| 478 | - { | |
| 479 | - return Mailbox::listScan($imap, $reference, $pattern, $content); | |
| 480 | - } | |
| 481 | -} | |
| 482 | - | |
| 483 | -/** | |
| 484 | - * imap2_scanmailbox | |
| 485 | - */ | |
| 486 | -if (!function_exists('imap_scanmailbox')) { | |
| 487 | - /** @codeCoverageIgnore */ | |
| 488 | - function imap_scanmailbox($imap, $reference, $pattern, $content) | |
| 489 | - { | |
| 490 | - return imap2_scanmailbox($imap, $reference, $pattern, $content); | |
| 491 | - } | |
| 492 | -} | |
| 493 | -if (!function_exists('imap2_scanmailbox')) { | |
| 494 | - function imap2_scanmailbox($imap, $reference, $pattern, $content) | |
| 495 | - { | |
| 496 | - return Mailbox::listScan($imap, $reference, $pattern, $content); | |
| 497 | - } | |
| 498 | -} | |
| 499 | - | |
| 500 | -/** | |
| 501 | - * imap2_getmailboxes | |
| 502 | - */ | |
| 503 | -if (!function_exists('imap_getmailboxes')) { | |
| 504 | - /** @codeCoverageIgnore */ | |
| 505 | - function imap_getmailboxes($imap, $reference, $pattern) | |
| 506 | - { | |
| 507 | - return imap2_getmailboxes($imap, $reference, $pattern); | |
| 508 | - } | |
| 509 | -} | |
| 510 | -if (!function_exists('imap2_getmailboxes')) { | |
| 511 | - function imap2_getmailboxes($imap, $reference, $pattern) | |
| 512 | - { | |
| 513 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 514 | - return imap_getmailboxes($imap, $reference, $pattern); | |
| 515 | - } | |
| 516 | - | |
| 517 | - return Mailbox::getMailboxes($imap, $reference, $pattern); | |
| 518 | - } | |
| 519 | -} | |
| 520 | - | |
| 521 | -/** | |
| 522 | - * imap2_listsubscribed | |
| 523 | - */ | |
| 524 | -if (!function_exists('imap_listsubscribed')) { | |
| 525 | - /** @codeCoverageIgnore */ | |
| 526 | - function imap_listsubscribed($imap, $reference, $pattern) | |
| 527 | - { | |
| 528 | - return imap2_listsubscribed($imap, $reference, $pattern); | |
| 529 | - } | |
| 530 | -} | |
| 531 | -if (!function_exists('imap2_listsubscribed')) { | |
| 532 | - function imap2_listsubscribed($imap, $reference, $pattern) | |
| 533 | - { | |
| 534 | - return Mailbox::listSubscribed($imap, $reference, $pattern); | |
| 535 | - } | |
| 536 | -} | |
| 537 | - | |
| 538 | -/** | |
| 539 | - * imap2_lsub | |
| 540 | - */ | |
| 541 | -if (!function_exists('imap_lsub')) { | |
| 542 | - /** @codeCoverageIgnore */ | |
| 543 | - function imap_lsub($imap, $reference, $pattern) | |
| 544 | - { | |
| 545 | - return imap2_lsub($imap, $reference, $pattern); | |
| 546 | - } | |
| 547 | -} | |
| 548 | -if (!function_exists('imap2_lsub')) { | |
| 549 | - function imap2_lsub($imap, $reference, $pattern) | |
| 550 | - { | |
| 551 | - return Mailbox::listSubscribed($imap, $reference, $pattern); | |
| 552 | - } | |
| 553 | -} | |
| 554 | - | |
| 555 | -/** | |
| 556 | - * imap2_getsubscribed | |
| 557 | - */ | |
| 558 | -if (!function_exists('imap_getsubscribed')) { | |
| 559 | - /** @codeCoverageIgnore */ | |
| 560 | - function imap_getsubscribed($imap, $reference, $pattern) | |
| 561 | - { | |
| 562 | - return imap2_getsubscribed($imap, $reference, $pattern); | |
| 563 | - } | |
| 564 | -} | |
| 565 | -if (!function_exists('imap2_getsubscribed')) { | |
| 566 | - function imap2_getsubscribed($imap, $reference, $pattern) | |
| 567 | - { | |
| 568 | - return Mailbox::getSubscribed($imap, $reference, $pattern); | |
| 569 | - } | |
| 570 | -} | |
| 571 | - | |
| 572 | -/** | |
| 573 | - * imap2_subscribe | |
| 574 | - */ | |
| 575 | -if (!function_exists('imap_subscribe')) { | |
| 576 | - /** @codeCoverageIgnore */ | |
| 577 | - function imap_subscribe($imap, $mailbox) | |
| 578 | - { | |
| 579 | - return imap2_subscribe($imap, $mailbox); | |
| 580 | - } | |
| 581 | -} | |
| 582 | -if (!function_exists('imap2_subscribe')) { | |
| 583 | - function imap2_subscribe($imap, $mailbox) | |
| 584 | - { | |
| 585 | - return Mailbox::subscribe($imap, $mailbox); | |
| 586 | - } | |
| 587 | -} | |
| 588 | - | |
| 589 | -/** | |
| 590 | - * imap2_unsubscribe | |
| 591 | - */ | |
| 592 | -if (!function_exists('imap_unsubscribe')) { | |
| 593 | - function imap_unsubscribe($imap, $mailbox) | |
| 594 | - { | |
| 595 | - return imap2_unsubscribe($imap, $mailbox); | |
| 596 | - } | |
| 597 | -} | |
| 598 | -if (!function_exists('imap2_unsubscribe')) { | |
| 599 | - function imap2_unsubscribe($imap, $mailbox) | |
| 600 | - { | |
| 601 | - return Mailbox::unsubscribe($imap, $mailbox); | |
| 602 | - } | |
| 603 | -} | |
| 604 | - | |
| 605 | -/** | |
| 606 | - * imap2_createmailbox | |
| 607 | - */ | |
| 608 | -if (!function_exists('imap_createmailbox')) { | |
| 609 | - function imap_createmailbox($imap, $mailbox) | |
| 610 | - { | |
| 611 | - return imap2_createmailbox($imap, $mailbox); | |
| 612 | - } | |
| 613 | -} | |
| 614 | -if (!function_exists('imap2_createmailbox')) { | |
| 615 | - function imap2_createmailbox($imap, $mailbox) | |
| 616 | - { | |
| 617 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 618 | - return imap_createmailbox($imap, $mailbox); | |
| 619 | - } | |
| 620 | - | |
| 621 | - return Mailbox::createMailbox($imap, $mailbox); | |
| 622 | - } | |
| 623 | -} | |
| 624 | - | |
| 625 | -/** | |
| 626 | - * imap2_create | |
| 627 | - */ | |
| 628 | -if (!function_exists('imap_create')) { | |
| 629 | - function imap_create($imap, $mailbox) | |
| 630 | - { | |
| 631 | - return imap2_create($imap, $mailbox); | |
| 632 | - } | |
| 633 | -} | |
| 634 | -if (!function_exists('imap2_create')) { | |
| 635 | - function imap2_create($imap, $mailbox) | |
| 636 | - { | |
| 637 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 638 | - return imap_create($imap, $mailbox); | |
| 639 | - } | |
| 640 | - | |
| 641 | - return Mailbox::createMailbox($imap, $mailbox); | |
| 642 | - } | |
| 643 | -} | |
| 644 | - | |
| 645 | -/** | |
| 646 | - * imap2_deletemailbox | |
| 647 | - */ | |
| 648 | -if (!function_exists('imap_deletemailbox')) { | |
| 649 | - function imap_deletemailbox($imap, $mailbox) | |
| 650 | - { | |
| 651 | - return imap2_deletemailbox($imap, $mailbox); | |
| 652 | - } | |
| 653 | -} | |
| 654 | -if (!function_exists('imap2_deletemailbox')) { | |
| 655 | - function imap2_deletemailbox($imap, $mailbox) | |
| 656 | - { | |
| 657 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 658 | - return imap_deletemailbox($imap, $mailbox); | |
| 659 | - } | |
| 660 | - | |
| 661 | - return Mailbox::deleteMailbox($imap, $mailbox); | |
| 662 | - } | |
| 663 | -} | |
| 664 | - | |
| 665 | -/** | |
| 666 | - * imap2_renamemailbox | |
| 667 | - */ | |
| 668 | -if (!function_exists('imap_renamemailbox')) { | |
| 669 | - function imap_renamemailbox($imap, $from, $to) | |
| 670 | - { | |
| 671 | - return imap2_renamemailbox($imap, $from, $to); | |
| 672 | - } | |
| 673 | -} | |
| 674 | -if (!function_exists('imap2_renamemailbox')) { | |
| 675 | - function imap2_renamemailbox($imap, $from, $to) | |
| 676 | - { | |
| 677 | - return Mailbox::renameMailbox($imap, $from, $to); | |
| 678 | - } | |
| 679 | -} | |
| 680 | - | |
| 681 | -/** | |
| 682 | - * imap2_rename | |
| 683 | - */ | |
| 684 | -if (!function_exists('imap_rename')) { | |
| 685 | - function imap_rename($imap, $from, $to) | |
| 686 | - { | |
| 687 | - return imap2_rename($imap, $from, $to); | |
| 688 | - } | |
| 689 | -} | |
| 690 | -if (!function_exists('imap2_rename')) { | |
| 691 | - function imap2_rename($imap, $from, $to) | |
| 692 | - { | |
| 693 | - return Mailbox::renameMailbox($imap, $from, $to); | |
| 694 | - } | |
| 695 | -} | |
| 696 | - | |
| 697 | -/** | |
| 698 | - * imap2_mailboxmsginfo | |
| 699 | - */ | |
| 700 | -if (!function_exists('imap_mailboxmsginfo')) { | |
| 701 | - function imap_mailboxmsginfo($imap) | |
| 702 | - { | |
| 703 | - return imap2_mailboxmsginfo($imap); | |
| 704 | - } | |
| 705 | -} | |
| 706 | -if (!function_exists('imap2_mailboxmsginfo')) { | |
| 707 | - function imap2_mailboxmsginfo($imap) | |
| 708 | - { | |
| 709 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 710 | - return imap_mailboxmsginfo($imap); | |
| 711 | - } | |
| 712 | - | |
| 713 | - return Mailbox::mailboxMsgInfo($imap); | |
| 714 | - } | |
| 715 | -} | |
| 716 | - | |
| 717 | -/** | |
| 718 | - * imap_search | |
| 719 | - */ | |
| 720 | -if (!function_exists('imap_search')) { | |
| 721 | - function imap_search($imap, $criteria, $flags = SE_FREE, $charset = "") | |
| 722 | - { | |
| 723 | - return imap2_search($imap, $criteria, $flags, $charset); | |
| 724 | - } | |
| 725 | -} | |
| 726 | -if (!function_exists('imap2_search')) { | |
| 727 | - function imap2_search($imap, $criteria, $flags = SE_FREE, $charset = "") | |
| 728 | - { | |
| 729 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 730 | - return imap_search($imap, $criteria, $flags, $charset); | |
| 731 | - } | |
| 732 | - | |
| 733 | - return Message::search($imap, $criteria, $flags, $charset); | |
| 734 | - } | |
| 735 | -} | |
| 736 | - | |
| 737 | -/** | |
| 738 | - * imap2_headers | |
| 739 | - */ | |
| 740 | -if (!function_exists('imap_headers')) { | |
| 741 | - function imap_headers($imap) | |
| 742 | - { | |
| 743 | - return imap2_headers($imap); | |
| 744 | - } | |
| 745 | -} | |
| 746 | -if (!function_exists('imap2_headers')) { | |
| 747 | - function imap2_headers($imap) | |
| 748 | - { | |
| 749 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 750 | - return imap_headers($imap); | |
| 751 | - } | |
| 752 | - | |
| 753 | - return Message::headers($imap); | |
| 754 | - } | |
| 755 | -} | |
| 756 | - | |
| 757 | -/** | |
| 758 | - * imap2_msgno | |
| 759 | - */ | |
| 760 | -if (!function_exists('imap_msgno')) { | |
| 761 | - function imap_msgno($imap, $messageUid) | |
| 762 | - { | |
| 763 | - return imap2_msgno($imap, $messageUid); | |
| 764 | - } | |
| 765 | -} | |
| 766 | -if (!function_exists('imap2_msgno')) { | |
| 767 | - function imap2_msgno($imap, $messageUid) | |
| 768 | - { | |
| 769 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 770 | - return imap_msgno($imap, $messageUid); | |
| 771 | - } | |
| 772 | - | |
| 773 | - return Message::msgNo($imap, $messageUid); | |
| 774 | - } | |
| 775 | -} | |
| 776 | - | |
| 777 | -/** | |
| 778 | - * imap2_uid | |
| 779 | - */ | |
| 780 | -if (!function_exists('imap_uid')) { | |
| 781 | - function imap_uid($imap, $messageNum) | |
| 782 | - { | |
| 783 | - return imap2_uid($imap, $messageNum); | |
| 784 | - } | |
| 785 | -} | |
| 786 | -if (!function_exists('imap2_uid')) { | |
| 787 | - function imap2_uid($imap, $messageNum) | |
| 788 | - { | |
| 789 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 790 | - return imap_uid($imap, $messageNum); | |
| 791 | - } | |
| 792 | - | |
| 793 | - return Message::uid($imap, $messageNum); | |
| 794 | - } | |
| 795 | -} | |
| 796 | - | |
| 797 | -/** | |
| 798 | - * imap2_sort | |
| 799 | - */ | |
| 800 | -if (!function_exists('imap_sort')) { | |
| 801 | - function imap_sort($imap, $criteria, $reverse, $flags = 0, $searchCriteria = null, $charset = null) | |
| 802 | - { | |
| 803 | - return imap2_sort($imap, $criteria, $reverse, $flags, $searchCriteria, $charset); | |
| 804 | - } | |
| 805 | -} | |
| 806 | -if (!function_exists('imap2_sort')) { | |
| 807 | - function imap2_sort($imap, $criteria, $reverse, $flags = 0, $searchCriteria = null, $charset = null) | |
| 808 | - { | |
| 809 | - return Message::sort($imap, $criteria, $reverse, $flags, $searchCriteria, $charset); | |
| 810 | - } | |
| 811 | -} | |
| 812 | - | |
| 813 | -/** | |
| 814 | - * | |
| 815 | - */ | |
| 816 | -if (!function_exists('imap_append')) { | |
| 817 | - function imap_append($imap, $folder, $message, $options = null, $internalDate = null) | |
| 818 | - { | |
| 819 | - return imap2_append($imap, $folder, $message, $options, $internalDate); | |
| 820 | - } | |
| 821 | -} | |
| 822 | -if (!function_exists('imap2_append')) { | |
| 823 | - function imap2_append($imap, $folder, $message, $options = null, $internalDate = null) | |
| 824 | - { | |
| 825 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 826 | - return imap_append($imap, $folder, $message, $options, $internalDate); | |
| 827 | - } | |
| 828 | - | |
| 829 | - return Mailbox::append($imap, $folder, $message, $options, $internalDate); | |
| 830 | - } | |
| 831 | -} | |
| 832 | - | |
| 833 | -/** | |
| 834 | - * imap2_headerinfo | |
| 835 | - */ | |
| 836 | -if (!function_exists('imap_headerinfo')) { | |
| 837 | - function imap_headerinfo($imap, $messageNum, $fromLength = 0, $subjectLength = 0, $defaultHost = null) | |
| 838 | - { | |
| 839 | - return imap2_headerinfo($imap, $messageNum, $fromLength, $subjectLength, $defaultHost); | |
| 840 | - } | |
| 841 | -} | |
| 842 | -if (!function_exists('imap2_headerinfo')) { | |
| 843 | - function imap2_headerinfo($imap, $messageNum, $fromLength = 0, $subjectLength = 0, $defaultHost = null) | |
| 844 | - { | |
| 845 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 846 | - return imap_headerinfo($imap, $messageNum, $fromLength, $subjectLength, $defaultHost); | |
| 847 | - } | |
| 848 | - | |
| 849 | - return Message::headerInfo($imap, $messageNum, $fromLength, $subjectLength, $defaultHost); | |
| 850 | - } | |
| 851 | -} | |
| 852 | - | |
| 853 | -/** | |
| 854 | - * imap2_header | |
| 855 | - */ | |
| 856 | -if (!function_exists('imap_header')) { | |
| 857 | - function imap_header($imap, $messageNum, $fromLength = 0, $subjectLength = 0, $defaultHost = null) | |
| 858 | - { | |
| 859 | - return imap2_header($imap, $messageNum, $fromLength, $subjectLength, $defaultHost); | |
| 860 | - } | |
| 861 | -} | |
| 862 | -if (!function_exists('imap2_header')) { | |
| 863 | - function imap2_header($imap, $messageNum, $fromLength = 0, $subjectLength = 0, $defaultHost = null) | |
| 864 | - { | |
| 865 | - return Message::headerInfo($imap, $messageNum, $fromLength, $subjectLength, $defaultHost); | |
| 866 | - } | |
| 867 | -} | |
| 868 | - | |
| 869 | -/** | |
| 870 | - * imap2_body | |
| 871 | - */ | |
| 872 | -if (!function_exists('imap_body')) { | |
| 873 | - function imap_body($imap, $messageNum, $flags = 0) | |
| 874 | - { | |
| 875 | - return imap2_body($imap, $messageNum, $flags); | |
| 876 | - } | |
| 877 | -} | |
| 878 | -if (!function_exists('imap2_body')) { | |
| 879 | - function imap2_body($imap, $messageNum, $flags = 0) | |
| 880 | - { | |
| 881 | - if (IMAP2_RETROFIT_MODE && Functions::isRetrofitResource($imap)) { | |
| 882 | - return imap_body($imap, $messageNum, $flags); | |
| 883 | - } | |
| 884 | - | |
| 885 | - return Message::body($imap, $messageNum, $flags); | |
| 886 | - } | |
| 887 | -} | |
| 888 | - | |
| 889 | -/** | |
| 890 | - * imap2_fetchtext | |
| 891 | - */ | |
| 892 | -if (!function_exists('imap_fetchtext')) { | |
| 893 | - function imap_fetchtext($imap, $messageNum, $flags = 0) | |
| 894 | - { | |
| 895 | - return imap2_fetchtext($imap, $messageNum, $flags); | |
| 896 | - } | |
| 897 | -} | |
| 898 | -if (!function_exists('imap2_fetchtext')) { | |
| 899 | - function imap2_fetchtext($imap, $messageNum, $flags = 0) | |
| 900 | - { | |
| 901 | - if (IMAP2_RETROFIT_MODE && Functions::isRetrofitResource($imap)) { | |
| 902 | - return imap_fetchtext($imap, $messageNum, $flags); | |
| 903 | - } | |
| 904 | - | |
| 905 | - return Message::body($imap, $messageNum, $flags); | |
| 906 | - } | |
| 907 | -} | |
| 908 | - | |
| 909 | -/** | |
| 910 | - * imap2_fetchbody | |
| 911 | - */ | |
| 912 | -if (!function_exists('imap_fetchbody')) { | |
| 913 | - function imap_fetchbody($imap, $messageNum, $section, $flags = 0) | |
| 914 | - { | |
| 915 | - return imap2_fetchbody($imap, $messageNum, $section, $flags); | |
| 916 | - } | |
| 917 | -} | |
| 918 | -if (!function_exists('imap2_fetchbody')) { | |
| 919 | - function imap2_fetchbody($imap, $messageNum, $section, $flags = 0) | |
| 920 | - { | |
| 921 | - if (IMAP2_RETROFIT_MODE && Functions::isRetrofitResource($imap)) { | |
| 922 | - return imap_fetchbody($imap, $messageNum, $section, $flags); | |
| 923 | - } | |
| 924 | - | |
| 925 | - return Message::fetchBody($imap, $messageNum, $section, $flags); | |
| 926 | - } | |
| 927 | -} | |
| 928 | - | |
| 929 | -/** | |
| 930 | - * imap2_bodystruct | |
| 931 | - */ | |
| 932 | -if (!function_exists('imap_bodystruct')) { | |
| 933 | - function imap_bodystruct($imap, $messageNum, $section) | |
| 934 | - { | |
| 935 | - return imap2_bodystruct($imap, $messageNum, $section); | |
| 936 | - } | |
| 937 | -} | |
| 938 | -if (!function_exists('imap2_bodystruct')) { | |
| 939 | - function imap2_bodystruct($imap, $messageNum, $section) | |
| 940 | - { | |
| 941 | - if (IMAP2_RETROFIT_MODE && Functions::isRetrofitResource($imap)) { | |
| 942 | - return imap_bodystruct($imap, $messageNum, $section); | |
| 943 | - } | |
| 944 | - | |
| 945 | - return Message::bodyStruct($imap, $messageNum, $section); | |
| 946 | - } | |
| 947 | -} | |
| 948 | - | |
| 949 | -/** | |
| 950 | - * imap2_savebody | |
| 951 | - */ | |
| 952 | -if (!function_exists('imap_savebody')) { | |
| 953 | - function imap_savebody($imap, $file, $messageNum, $section = "", $flags = 0) | |
| 954 | - { | |
| 955 | - return imap2_savebody($imap, $file, $messageNum, $section, $flags); | |
| 956 | - } | |
| 957 | -} | |
| 958 | -if (!function_exists('imap2_savebody')) { | |
| 959 | - function imap2_savebody($imap, $file, $messageNum, $section = "", $flags = 0) | |
| 960 | - { | |
| 961 | - if (IMAP2_RETROFIT_MODE && Functions::isRetrofitResource($imap)) { | |
| 962 | - return imap_savebody($imap, $file, $messageNum, $section, $flags); | |
| 963 | - } | |
| 964 | - | |
| 965 | - return Message::saveBody($imap, $file, $messageNum, $section, $flags); | |
| 966 | - } | |
| 967 | -} | |
| 968 | - | |
| 969 | -/** | |
| 970 | - * imap2_fetchstructure | |
| 971 | - */ | |
| 972 | -if (!function_exists('imap_fetchstructure')) { | |
| 973 | - function imap_fetchstructure($imap, $messageNum, $flags = 0) | |
| 974 | - { | |
| 975 | - return imap2_fetchstructure($imap, $messageNum, $flags); | |
| 976 | - } | |
| 977 | -} | |
| 978 | -if (!function_exists('imap2_fetchstructure')) { | |
| 979 | - function imap2_fetchstructure($imap, $messageNum, $flags = 0) | |
| 980 | - { | |
| 981 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 982 | - return imap_fetchstructure($imap, $messageNum, $flags); | |
| 983 | - } | |
| 984 | - | |
| 985 | - return Message::fetchStructure($imap, $messageNum, $flags); | |
| 986 | - } | |
| 987 | -} | |
| 988 | - | |
| 989 | -/** | |
| 990 | - * imap2_fetchheader | |
| 991 | - */ | |
| 992 | -if (!function_exists('imap_fetchheader')) { | |
| 993 | - function imap_fetchheader($imap, $messageNum, $flags = 0) | |
| 994 | - { | |
| 995 | - return imap2_fetchheader($imap, $messageNum, $flags); | |
| 996 | - } | |
| 997 | -} | |
| 998 | -if (!function_exists('imap2_fetchheader')) { | |
| 999 | - function imap2_fetchheader($imap, $messageNum, $flags = 0) | |
| 1000 | - { | |
| 1001 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 1002 | - return imap_fetchheader($imap, $messageNum, $flags); | |
| 1003 | - } | |
| 1004 | - | |
| 1005 | - return Message::fetchHeader($imap, $messageNum, $flags); | |
| 1006 | - } | |
| 1007 | -} | |
| 1008 | - | |
| 1009 | -/** | |
| 1010 | - * imap2_fetch_overview | |
| 1011 | - */ | |
| 1012 | -if (!function_exists('imap_fetch_overview')) { | |
| 1013 | - function imap_fetch_overview($imap, $sequence, $flags = 0) | |
| 1014 | - { | |
| 1015 | - return imap2_fetch_overview($imap, $sequence, $flags); | |
| 1016 | - } | |
| 1017 | -} | |
| 1018 | -if (!function_exists('imap2_fetch_overview')) { | |
| 1019 | - function imap2_fetch_overview($imap, $sequence, $flags = 0) | |
| 1020 | - { | |
| 1021 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 1022 | - return imap_fetch_overview($imap, $sequence, $flags); | |
| 1023 | - } | |
| 1024 | - | |
| 1025 | - return Message::fetchOverview($imap, $sequence, $flags); | |
| 1026 | - } | |
| 1027 | -} | |
| 1028 | - | |
| 1029 | -/** | |
| 1030 | - * imap2_fetchmime | |
| 1031 | - */ | |
| 1032 | -if (!function_exists('imap_fetchmime')) { | |
| 1033 | - function imap_fetchmime($imap, $messageNum, $section, $flags = 0) | |
| 1034 | - { | |
| 1035 | - return imap2_fetchmime($imap, $messageNum, $section, $flags); | |
| 1036 | - } | |
| 1037 | -} | |
| 1038 | -if (!function_exists('imap2_fetchmime')) { | |
| 1039 | - function imap2_fetchmime($imap, $messageNum, $section, $flags = 0) | |
| 1040 | - { | |
| 1041 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 1042 | - return imap_fetchmime($imap, $messageNum, $section, $flags); | |
| 1043 | - } | |
| 1044 | - | |
| 1045 | - return Message::fetchMime($imap, $messageNum, $section, $flags); | |
| 1046 | - } | |
| 1047 | -} | |
| 1048 | - | |
| 1049 | -/** | |
| 1050 | - * imap2_delete | |
| 1051 | - */ | |
| 1052 | -if (!function_exists('imap_delete')) { | |
| 1053 | - function imap_delete($imap, $messageNums, $flags = 0) | |
| 1054 | - { | |
| 1055 | - return imap2_delete($imap, $messageNums, $flags); | |
| 1056 | - } | |
| 1057 | -} | |
| 1058 | -if (!function_exists('imap2_delete')) { | |
| 1059 | - function imap2_delete($imap, $messageNums, $flags = 0) | |
| 1060 | - { | |
| 1061 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 1062 | - return imap_delete($imap, $messageNums, $flags); | |
| 1063 | - } | |
| 1064 | - | |
| 1065 | - return Message::delete($imap, $messageNums, $flags); | |
| 1066 | - } | |
| 1067 | -} | |
| 1068 | - | |
| 1069 | -/** | |
| 1070 | - * imap2_undelete | |
| 1071 | - */ | |
| 1072 | -if (!function_exists('imap_undelete')) { | |
| 1073 | - function imap_undelete($imap, $messageNums, $flags = 0) | |
| 1074 | - { | |
| 1075 | - return imap2_undelete($imap, $messageNums, $flags); | |
| 1076 | - } | |
| 1077 | -} | |
| 1078 | -if (!function_exists('imap2_undelete')) { | |
| 1079 | - function imap2_undelete($imap, $messageNums, $flags = 0) | |
| 1080 | - { | |
| 1081 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 1082 | - return imap_undelete($imap, $messageNums, $flags); | |
| 1083 | - } | |
| 1084 | - | |
| 1085 | - return Message::undelete($imap, $messageNums, $flags); | |
| 1086 | - } | |
| 1087 | -} | |
| 1088 | - | |
| 1089 | -/** | |
| 1090 | - * imap2_clearflag_full | |
| 1091 | - */ | |
| 1092 | -if (!function_exists('imap_clearflag_full')) { | |
| 1093 | - function imap_clearflag_full($imap, $sequence, $flag, $options = 0) | |
| 1094 | - { | |
| 1095 | - return imap2_clearflag_full($imap, $sequence, $flag, $options); | |
| 1096 | - } | |
| 1097 | -} | |
| 1098 | -if (!function_exists('imap2_clearflag_full')) { | |
| 1099 | - function imap2_clearflag_full($imap, $sequence, $flag, $options = 0) | |
| 1100 | - { | |
| 1101 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 1102 | - return imap_clearflag_full($imap, $sequence, $flag, $options); | |
| 1103 | - } | |
| 1104 | - | |
| 1105 | - return Message::clearFlagFull($imap, $sequence, $flag, $options); | |
| 1106 | - } | |
| 1107 | -} | |
| 1108 | - | |
| 1109 | -/** | |
| 1110 | - * imap2_setflag_full | |
| 1111 | - */ | |
| 1112 | -if (!function_exists('imap_setflag_full')) { | |
| 1113 | - function imap_setflag_full($imap, $sequence, $flag, $options = 0) | |
| 1114 | - { | |
| 1115 | - return imap2_setflag_full($imap, $sequence, $flag, $options); | |
| 1116 | - } | |
| 1117 | -} | |
| 1118 | -if (!function_exists('imap2_setflag_full')) { | |
| 1119 | - function imap2_setflag_full($imap, $sequence, $flag, $options = 0) | |
| 1120 | - { | |
| 1121 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 1122 | - return imap_setflag_full($imap, $sequence, $flag, $options); | |
| 1123 | - } | |
| 1124 | - | |
| 1125 | - return Message::setFlagFull($imap, $sequence, $flag, $options); | |
| 1126 | - } | |
| 1127 | -} | |
| 1128 | - | |
| 1129 | -/** | |
| 1130 | - * imap2_mail_compose | |
| 1131 | - */ | |
| 1132 | -if (!function_exists('imap_mail_compose')) { | |
| 1133 | - function imap_mail_compose($envelope, $bodies) | |
| 1134 | - { | |
| 1135 | - return imap2_mail_compose($envelope, $bodies); | |
| 1136 | - } | |
| 1137 | -} | |
| 1138 | -if (!function_exists('imap2_mail_compose')) { | |
| 1139 | - function imap2_mail_compose($envelope, $bodies) | |
| 1140 | - { | |
| 1141 | - return Polyfill::mailCompose($envelope, $bodies); | |
| 1142 | - } | |
| 1143 | -} | |
| 1144 | - | |
| 1145 | -/** | |
| 1146 | - * imap2_mail_copy | |
| 1147 | - */ | |
| 1148 | -if (!function_exists('imap_mail_copy')) { | |
| 1149 | - function imap_mail_copy($imap, $messageNums, $mailbox, $flags = 0) | |
| 1150 | - { | |
| 1151 | - return imap2_mail_copy($imap, $messageNums, $mailbox, $flags); | |
| 1152 | - } | |
| 1153 | -} | |
| 1154 | -if (!function_exists('imap2_mail_copy')) { | |
| 1155 | - function imap2_mail_copy($imap, $messageNums, $mailbox, $flags = 0) | |
| 1156 | - { | |
| 1157 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 1158 | - return imap_mail_copy($imap, $messageNums, $mailbox, $flags); | |
| 1159 | - } | |
| 1160 | - | |
| 1161 | - return Mail::copy($imap, $messageNums, $mailbox, $flags); | |
| 1162 | - } | |
| 1163 | -} | |
| 1164 | - | |
| 1165 | -/** | |
| 1166 | - * imap2_mail_move | |
| 1167 | - */ | |
| 1168 | -if (!function_exists('imap_mail_move')) { | |
| 1169 | - function imap_mail_move($imap, $messageNums, $mailbox, $flags = 0) | |
| 1170 | - { | |
| 1171 | - return imap2_mail_move($imap, $messageNums, $mailbox, $flags); | |
| 1172 | - } | |
| 1173 | -} | |
| 1174 | -if (!function_exists('imap2_mail_move')) { | |
| 1175 | - function imap2_mail_move($imap, $messageNums, $mailbox, $flags = 0) | |
| 1176 | - { | |
| 1177 | - if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') { | |
| 1178 | - return imap_mail_move($imap, $messageNums, $mailbox, $flags); | |
| 1179 | - } | |
| 1180 | - | |
| 1181 | - return Mail::move($imap, $messageNums, $mailbox, $flags); | |
| 1182 | - } | |
| 1183 | -} | |
| 1184 | - | |
| 1185 | -/** | |
| 1186 | - * imap2_mail | |
| 1187 | - */ | |
| 1188 | -if (!function_exists('imap_mail')) { | |
| 1189 | - function imap_mail($to, $subject, $message, $additionalHeaders = null, $cc = null, $bcc = null, $returnPath = null) | |
| 1190 | - { | |
| 1191 | - return imap2_mail($to, $subject, $message, $additionalHeaders, $cc, $bcc, $returnPath); | |
| 1192 | - } | |
| 1193 | -} | |
| 1194 | -if (!function_exists('imap2_mail')) { | |
| 1195 | - function imap2_mail($to, $subject, $message, $additionalHeaders = null, $cc = null, $bcc = null, $returnPath = null) | |
| 1196 | - { | |
| 1197 | - if (IMAP2_RETROFIT_MODE) { | |
| 1198 | - return imap_mail($to, $subject, $message, $additionalHeaders, $cc, $bcc, $returnPath); | |
| 1199 | - } | |
| 1200 | - | |
| 1201 | - return Mail::send($to, $subject, $message, $additionalHeaders, $cc, $bcc, $returnPath); | |
| 1202 | - } | |
| 1203 | -} | |
| 1204 | - | |
| 1205 | -/** | |
| 1206 | - * imap2_expunge | |
| 1207 | - */ | |
| 1208 | -if (!function_exists('imap_expunge')) { | |
| 1209 | - function imap_expunge($imap) | |
| 1210 | - { | |
| 1211 | - return imap2_expunge($imap); | |
| 1212 | - } | |
| 1213 | -} | |
| 1214 | -if (!function_exists('imap2_expunge')) { | |
| 1215 | - function imap2_expunge($imap) | |
| 1216 | - { | |
| 1217 | - return Message::expunge($imap); | |
| 1218 | - } | |
| 1219 | -} | |
| 1220 | - | |
| 1221 | -/** | |
| 1222 | - * imap2_gc | |
| 1223 | - */ | |
| 1224 | -if (!function_exists('imap_gc')) { | |
| 1225 | - function imap_gc($imap, $flags) | |
| 1226 | - { | |
| 1227 | - return imap2_gc($imap, $flags); | |
| 1228 | - } | |
| 1229 | -} | |
| 1230 | -if (!function_exists('imap2_gc')) { | |
| 1231 | - function imap2_gc($imap, $flags) | |
| 1232 | - { | |
| 1233 | - return Message::expunge($imap, $flags); | |
| 1234 | - } | |
| 1235 | -} | |
| 1236 | - | |
| 1237 | -/** | |
| 1238 | - * imap2_get_quota | |
| 1239 | - */ | |
| 1240 | -if (!function_exists('imap_get_quota')) { | |
| 1241 | - function imap_get_quota($imap, $quotaRoot) | |
| 1242 | - { | |
| 1243 | - return imap2_get_quota($imap, $quotaRoot); | |
| 1244 | - } | |
| 1245 | -} | |
| 1246 | -if (!function_exists('imap2_get_quota')) { | |
| 1247 | - function imap2_get_quota($imap, $quotaRoot) | |
| 1248 | - { | |
| 1249 | - return Message::expunge($imap, $quotaRoot); | |
| 1250 | - } | |
| 1251 | -} | |
| 1252 | - | |
| 1253 | -/** | |
| 1254 | - * imap2_set_quota | |
| 1255 | - */ | |
| 1256 | -if (!function_exists('imap_set_quota')) { | |
| 1257 | - function imap_set_quota($imap, $quotaRoot, $mailboxSize) | |
| 1258 | - { | |
| 1259 | - return imap2_set_quota($imap, $quotaRoot, $mailboxSize); | |
| 1260 | - } | |
| 1261 | -} | |
| 1262 | -if (!function_exists('imap2_set_quota')) { | |
| 1263 | - function imap2_set_quota($imap, $quotaRoot, $mailboxSize) | |
| 1264 | - { | |
| 1265 | - return Message::expunge($imap, $quotaRoot, $mailboxSize); | |
| 1266 | - } | |
| 1267 | -} | |
| 1268 | - | |
| 1269 | -/** | |
| 1270 | - * imap2_get_quotaroot | |
| 1271 | - */ | |
| 1272 | -if (!function_exists('imap_get_quotaroot')) { | |
| 1273 | - function imap_get_quotaroot($imap, $mailbox) | |
| 1274 | - { | |
| 1275 | - return imap2_get_quotaroot($imap, $mailbox); | |
| 1276 | - } | |
| 1277 | -} | |
| 1278 | -if (!function_exists('imap2_get_quotaroot')) { | |
| 1279 | - function imap2_get_quotaroot($imap, $mailbox) | |
| 1280 | - { | |
| 1281 | - return Message::expunge($imap, $mailbox); | |
| 1282 | - } | |
| 1283 | -} | |
| 1284 | - | |
| 1285 | -/** | |
| 1286 | - * imap2_getacl | |
| 1287 | - */ | |
| 1288 | -if (!function_exists('imap_getacl')) { | |
| 1289 | - function imap_getacl($imap, $mailbox) | |
| 1290 | - { | |
| 1291 | - return imap2_getacl($imap, $mailbox); | |
| 1292 | - } | |
| 1293 | -} | |
| 1294 | -if (!function_exists('imap2_getacl')) { | |
| 1295 | - function imap2_getacl($imap, $mailbox) | |
| 1296 | - { | |
| 1297 | - return Message::expunge($imap, $mailbox); | |
| 1298 | - } | |
| 1299 | -} | |
| 1300 | - | |
| 1301 | -/** | |
| 1302 | - * imap2_setacl | |
| 1303 | - */ | |
| 1304 | -if (!function_exists('imap_setacl')) { | |
| 1305 | - function imap_setacl($imap, $mailbox, $userId, $rights) | |
| 1306 | - { | |
| 1307 | - return imap2_setacl($imap, $mailbox, $userId, $rights); | |
| 1308 | - } | |
| 1309 | -} | |
| 1310 | -if (!function_exists('imap2_setacl')) { | |
| 1311 | - function imap2_setacl($imap, $mailbox, $userId, $rights) | |
| 1312 | - { | |
| 1313 | - return Message::expunge($imap, $mailbox, $userId, $rights); | |
| 1314 | - } | |
| 1315 | -} | |
| 1316 | - | |
| 1317 | -/** | |
| 1318 | - * imap2_thread | |
| 1319 | - */ | |
| 1320 | -if (!function_exists('imap_thread')) { | |
| 1321 | - function imap_thread($imap, $flags = SE_FREE) | |
| 1322 | - { | |
| 1323 | - return imap2_thread($imap, $flags); | |
| 1324 | - } | |
| 1325 | -} | |
| 1326 | -if (!function_exists('imap2_thread')) { | |
| 1327 | - function imap2_thread($imap, $flags = SE_FREE) | |
| 1328 | - { | |
| 1329 | - return Thread::thread($imap, $flags); | |
| 1330 | - } | |
| 1331 | -} | |
| 1332 | - | |
| 1333 | -/** | |
| 1334 | - * imap2_errors | |
| 1335 | - */ | |
| 1336 | -if (!function_exists('imap_errors')) { | |
| 1337 | - function imap_errors() | |
| 1338 | - { | |
| 1339 | - return imap2_errors(); | |
| 1340 | - } | |
| 1341 | -} | |
| 1342 | -if (!function_exists('imap2_errors')) { | |
| 1343 | - function imap2_errors() | |
| 1344 | - { | |
| 1345 | - return Errors::errors(); | |
| 1346 | - } | |
| 1347 | -} | |
| 1348 | - | |
| 1349 | -/** | |
| 1350 | - * imap2_last_error | |
| 1351 | - */ | |
| 1352 | -if (!function_exists('imap_last_error')) { | |
| 1353 | - function imap_last_error() | |
| 1354 | - { | |
| 1355 | - return imap2_last_error(); | |
| 1356 | - } | |
| 1357 | -} | |
| 1358 | -if (!function_exists('imap2_last_error')) { | |
| 1359 | - function imap2_last_error() | |
| 1360 | - { | |
| 1361 | - return Errors::lastError(); | |
| 1362 | - } | |
| 1363 | -} | |
| 1364 | - | |
| 1365 | -/** | |
| 1366 | - * imap2_alerts | |
| 1367 | - */ | |
| 1368 | -if (!function_exists('imap_alerts')) { | |
| 1369 | - function imap_alerts() | |
| 1370 | - { | |
| 1371 | - return imap2_alerts(); | |
| 1372 | - } | |
| 1373 | -} | |
| 1374 | -if (!function_exists('imap2_alerts')) { | |
| 1375 | - function imap2_alerts() | |
| 1376 | - { | |
| 1377 | - return Errors::alerts(); | |
| 1378 | - } | |
| 1379 | -} | |
| 1380 | - | |
| 1381 | -/** | |
| 1382 | - * imap2_8bit | |
| 1383 | - */ | |
| 1384 | -if (!function_exists('imap_8bit')) { | |
| 1385 | - function imap_8bit($string) | |
| 1386 | - { | |
| 1387 | - return imap2_8bit($string); | |
| 1388 | - } | |
| 1389 | -} | |
| 1390 | -if (!function_exists('imap2_8bit')) { | |
| 1391 | - function imap2_8bit($string) | |
| 1392 | - { | |
| 1393 | - return function_exists('imap_8bit') ? imap_8bit($string) : Polyfill::convert8bit($string); | |
| 1394 | - } | |
| 1395 | -} | |
| 1396 | - | |
| 1397 | -/** | |
| 1398 | - * imap2_base64 | |
| 1399 | - */ | |
| 1400 | -if (!function_exists('imap_base64')) { | |
| 1401 | - function imap_base64($string) | |
| 1402 | - { | |
| 1403 | - return imap2_base64($string); | |
| 1404 | - } | |
| 1405 | -} | |
| 1406 | -if (!function_exists('imap2_base64')) { | |
| 1407 | - function imap2_base64($string) | |
| 1408 | - { | |
| 1409 | - if (IMAP2_RETROFIT_MODE) { | |
| 1410 | - return imap_base64($string); | |
| 1411 | - } | |
| 1412 | - | |
| 1413 | - return Polyfill::base64($string); | |
| 1414 | - } | |
| 1415 | -} | |
| 1416 | - | |
| 1417 | -/** | |
| 1418 | - * imap2_binary | |
| 1419 | - */ | |
| 1420 | -if (!function_exists('imap_binary')) { | |
| 1421 | - function imap_binary($string) | |
| 1422 | - { | |
| 1423 | - return imap2_binary($string); | |
| 1424 | - } | |
| 1425 | -} | |
| 1426 | -if (!function_exists('imap2_binary')) { | |
| 1427 | - function imap2_binary($string) | |
| 1428 | - { | |
| 1429 | - if (IMAP2_RETROFIT_MODE) { | |
| 1430 | - return imap_binary($string); | |
| 1431 | - } | |
| 1432 | - | |
| 1433 | - return Polyfill::binary($string); | |
| 1434 | - } | |
| 1435 | -} | |
| 1436 | - | |
| 1437 | -/** | |
| 1438 | - * imap2_mime_header_decode | |
| 1439 | - */ | |
| 1440 | -if (!function_exists('imap_mime_header_decode')) { | |
| 1441 | - function imap_mime_header_decode($string) | |
| 1442 | - { | |
| 1443 | - return imap2_mime_header_decode($string); | |
| 1444 | - } | |
| 1445 | -} | |
| 1446 | -if (!function_exists('imap2_mime_header_decode')) { | |
| 1447 | - function imap2_mime_header_decode($string) | |
| 1448 | - { | |
| 1449 | - if (IMAP2_RETROFIT_MODE) { | |
| 1450 | - return imap_mime_header_decode($string); | |
| 1451 | - } | |
| 1452 | - | |
| 1453 | - return Polyfill::mimeHeaderDecode($string); | |
| 1454 | - } | |
| 1455 | -} | |
| 1456 | - | |
| 1457 | -/** | |
| 1458 | - * imap2_mutf7_to_utf8 | |
| 1459 | - */ | |
| 1460 | -if (!function_exists('imap_mutf7_to_utf8')) { | |
| 1461 | - function imap_mutf7_to_utf8($string) | |
| 1462 | - { | |
| 1463 | - return imap2_mutf7_to_utf8($string); | |
| 1464 | - } | |
| 1465 | -} | |
| 1466 | -if (!function_exists('imap2_mutf7_to_utf8')) { | |
| 1467 | - function imap2_mutf7_to_utf8($string) | |
| 1468 | - { | |
| 1469 | - if (IMAP2_RETROFIT_MODE) { | |
| 1470 | - return imap_mutf7_to_utf8($string); | |
| 1471 | - } | |
| 1472 | - | |
| 1473 | - return Polyfill::mutf7ToUtf8($string); | |
| 1474 | - } | |
| 1475 | -} | |
| 1476 | - | |
| 1477 | -/** | |
| 1478 | - * imap2_qprint | |
| 1479 | - */ | |
| 1480 | -if (!function_exists('imap_qprint')) { | |
| 1481 | - function imap_qprint($string) | |
| 1482 | - { | |
| 1483 | - return Polyfill::qPrint($string); | |
| 1484 | - } | |
| 1485 | -} | |
| 1486 | -if (!function_exists('imap2_qprint')) { | |
| 1487 | - function imap2_qprint($string) | |
| 1488 | - { | |
| 1489 | - return imap_qprint($string); | |
| 1490 | - } | |
| 1491 | -} | |
| 1492 | - | |
| 1493 | -/** | |
| 1494 | - * imap2_rfc822_parse_adrlist | |
| 1495 | - */ | |
| 1496 | -if (!function_exists('imap_rfc822_parse_adrlist')) { | |
| 1497 | - function imap_rfc822_parse_adrlist($string, $defaultHostname) | |
| 1498 | - { | |
| 1499 | - return Polyfill::rfc822ParseAdrList($string, $defaultHostname); | |
| 1500 | - } | |
| 1501 | -} | |
| 1502 | -if (!function_exists('imap2_rfc822_parse_adrlist')) { | |
| 1503 | - function imap2_rfc822_parse_adrlist($string, $defaultHostname) | |
| 1504 | - { | |
| 1505 | - return imap_rfc822_parse_adrlist($string, $defaultHostname); | |
| 1506 | - } | |
| 1507 | -} | |
| 1508 | - | |
| 1509 | -/** | |
| 1510 | - * imap2_rfc822_parse_headers | |
| 1511 | - */ | |
| 1512 | -if (!function_exists('imap_rfc822_parse_headers')) { | |
| 1513 | - function imap_rfc822_parse_headers($headers, $defaultHostname = 'UNKNOWN') | |
| 1514 | - { | |
| 1515 | - return Polyfill::rfc822ParseHeaders($headers, $defaultHostname); | |
| 1516 | - } | |
| 1517 | -} | |
| 1518 | -if (!function_exists('imap2_rfc822_parse_headers')) { | |
| 1519 | - function imap2_rfc822_parse_headers($headers, $defaultHostname = 'UNKNOWN') | |
| 1520 | - { | |
| 1521 | - return imap_rfc822_parse_headers($headers, $defaultHostname); | |
| 1522 | - } | |
| 1523 | -} | |
| 1524 | - | |
| 1525 | -/** | |
| 1526 | - * imap2_rfc822_write_address | |
| 1527 | - */ | |
| 1528 | -if (!function_exists('imap_rfc822_write_address')) { | |
| 1529 | - function imap_rfc822_write_address($mailbox, $hostname, $personal) | |
| 1530 | - { | |
| 1531 | - return Polyfill::rfc822WriteHeaders($mailbox, $hostname, $personal); | |
| 1532 | - } | |
| 1533 | -} | |
| 1534 | -if (!function_exists('imap2_rfc822_write_address')) { | |
| 1535 | - function imap2_rfc822_write_address($mailbox, $hostname, $personal) | |
| 1536 | - { | |
| 1537 | - return imap_rfc822_write_address($mailbox, $hostname, $personal); | |
| 1538 | - } | |
| 1539 | -} | |
| 1540 | - | |
| 1541 | -/** | |
| 1542 | - * imap_utf7_decode | |
| 1543 | - */ | |
| 1544 | -if (!function_exists('imap_utf7_decode')) { | |
| 1545 | - function imap_utf7_decode($string) | |
| 1546 | - { | |
| 1547 | - return Polyfill::utf7Decode($string); | |
| 1548 | - } | |
| 1549 | -} | |
| 1550 | -if (!function_exists('imap2_utf7_decode')) { | |
| 1551 | - function imap2_utf7_decode($string) | |
| 1552 | - { | |
| 1553 | - return imap_utf7_decode($string); | |
| 1554 | - } | |
| 1555 | -} | |
| 1556 | - | |
| 1557 | -/** | |
| 1558 | - * imap_utf7_encode | |
| 1559 | - */ | |
| 1560 | -if (!function_exists('imap_utf7_encode')) { | |
| 1561 | - function imap_utf7_encode($string) | |
| 1562 | - { | |
| 1563 | - return Polyfill::utf7Encode($string); | |
| 1564 | - } | |
| 1565 | -} | |
| 1566 | -if (!function_exists('imap2_utf7_encode')) { | |
| 1567 | - function imap2_utf7_encode($string) | |
| 1568 | - { | |
| 1569 | - return imap_utf7_encode($string); | |
| 1570 | - } | |
| 1571 | -} | |
| 1572 | - | |
| 1573 | -/** | |
| 1574 | - * imap2_utf8_to_mutf7 | |
| 1575 | - */ | |
| 1576 | -if (!function_exists('imap_utf8_to_mutf7')) { | |
| 1577 | - function imap_utf8_to_mutf7($string) | |
| 1578 | - { | |
| 1579 | - return Polyfill::utf8ToMutf7($string); | |
| 1580 | - } | |
| 1581 | -} | |
| 1582 | -if (!function_exists('imap2_utf8_to_mutf7')) { | |
| 1583 | - function imap2_utf8_to_mutf7($string) | |
| 1584 | - { | |
| 1585 | - return imap_utf8_to_mutf7($string); | |
| 1586 | - } | |
| 1587 | -} | |
| 1588 | - | |
| 1589 | -/** | |
| 1590 | - * imap2_utf8 | |
| 1591 | - */ | |
| 1592 | -if (!function_exists('imap_utf8')) { | |
| 1593 | - function imap_utf8($string) | |
| 1594 | - { | |
| 1595 | - return Polyfill::utf8($string); | |
| 1596 | - } | |
| 1597 | -} | |
| 1598 | -if (!function_exists('imap2_utf8')) { | |
| 1599 | - function imap2_utf8(string $string) | |
| 1600 | - { | |
| 1601 | - return imap_utf8($string); | |
| 1602 | - } | |
| 1603 | -} | |