PHP - 函数:imap_listmailbox()

PHP - 函数:imap_listmailbox(),第1张

PHP - 函数:imap_listmailbox() IMAP 电子邮件系统函数库
imap_listmailbox

获取邮箱列示。

语法: array imap_listmailbox(int stream_id, string ref, string pattern);

返回值: 数组

函数种类: 网络系统

内容说明

本函数可获得邮箱列示。参数 imap_stream 为 IMAP 的代号。参数 ref 通常为 IMAP 服务器名称,参考下例。参数 pattern 可用万用字符 * 代表全部的路径,[email protected] 并指出 (27-Apr-1999) 若本参数以 "" (空字符) 代入,不会返回资料。

使用范例

本例为 [email protected] 于 02-Jun-1999 所提出的。

?php
$Account = "myid";
$Password= "mypasswd";
$mailbox = imap_open("{mail.xyz.com:143}INBOX", $Account, $Password);
if ($mailbox) {
 $mailboxes = imap_listmailbox($mailbox, "{mail.xyz.com:143}", "*");
 for ($index = 0; $index   count($mailboxes); $index++) {
 print($mailboxes[$index] . "n");
 }
 imap_close($mailbox);
} else {
 print("无法?/font>}启 $Account 的信箱.n");
}
?


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/3004287.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-09-27
下一篇 2022-09-27

发表评论

登录后才能评论

评论列表(0条)

保存