本文整理汇总了PHP中POP3::Open方法的典型用法代码示例。如果您正苦于以下问题:PHP POP3::Open方法的具体用法?PHP POP3::Open怎么用?PHP POP3::Open使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类POP3
的用法示例。
在下文中一共展示了POP3::Open方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
$username = $xoopsUser->uname();
ob_start();
//parse_str(base64_decode($pop3_cookie));
require "pop3.php";
require "decodemessage.php";
include "mailheader.php";
include "class.rc4crypt.php";
$_GET = array_merge($_GET, $_POST);
$id = isset($_GET['id']) ? (int) $_GET['id'] : null;
$start = isset($_GET['start']) ? (int) $_GET['start'] : null;
$op = isset($_GET['op']) ? $_GET['op'] : null;
$msgid = isset($_GET['msgid']) ? $_GET['msgid'] : null;
getServer($id);
@set_time_limit(120);
$pop3 = new POP3($server, $username, $password, $port, $apop);
if (!$pop3->Open()) {
echo "<center>Not Connectable! Please check your POP3 settings.</center><br />";
}
if ($op == "delete") {
if (!is_array($msgid)) {
$msgid = array($msgid);
}
foreach ($msgid as $mid) {
$mid = intval($mid);
if ($mid) {
$pop3->DeleteMessage($mid);
--$start;
}
}
$pop3->Close();
$qs = '';
示例2: OpenTable
if ($action == "list") {
OpenTable();
echo "<center><b>" . _MD_WEBMAIL_MAILBOXESFOR . " {$username}</b></center>";
echo "<br /><table border=\"1\" align=\"center\" width=\"80%\">" . "<tr class='bg2'><td bgcolor=\"{$bgcolor2}\" width=\"33%\"> <b>" . _MD_WEBMAIL_ACCOUNT . "</b></td><td bgcolor=\"{$bgcolor2}\" width=\"33%\" align=\"center\"> <b>" . _MD_WEBMAIL_EMAILS . "</b></td><td bgcolor=\"{$bgcolor2}\" width=\"33%\" align=\"center\"> <b>" . _MD_WEBMAIL_TOTALSIZE . "</b></td></tr>";
while ($row = $xoopsDB->fetchArray($result)) {
$count++;
$server = $row[popserver];
$port = $row[port];
$apop = $row[apop];
$username = $row[uname];
$rc4 = new rc4crypt();
$password = $rc4->endecrypt($username, $row[passwd], "de");
$account = $row[account];
$serverid = $row[id];
$pop3 = new POP3($server, $username, $password, $port, $apop);
if ($pop3->Open()) {
$stats = $pop3->Stats();
$mailsum = $stats["message"];
$mailmem = round($stats["size"] / 1024) . " Kbytes";
$pop3->Close();
} else {
$mailsum = "Not Connectable!";
$mailmem = "N/A";
}
echo "<tr>" . "<td align=\"left\"> " . "<a href='inbox.php?id={$serverid}'>{$account}</a></td>" . "<td align=\"center\">{$mailsum}</td>" . "<td align=\"center\">{$mailmem}</td></tr>";
}
echo "</table><br /><br />" . "<center>" . _MD_WEBMAIL_SELECTACCOUNT . "</center>";
CloseTable();
}
echo "<div align='right'>" . $xoopsModule->name() . " Var. " . $webmail_var . "<br />" . $webmail_credits . "</div>";
include XOOPS_ROOT_PATH . "/footer.php";
示例3: DecodeMessage
}
$server = $row[popserver];
$port = $row[port];
$apop = $row[apop];
$username = $row[uname];
$rc4 = new rc4crypt();
$password = $rc4->endecrypt($username, $row[passwd], "de");
} else {
echo "Error: POP Server not set properly<br />";
include XOOPS_ROOT_PATH . "/footer.php";
exit;
}
$ms = $msgid;
set_time_limit(0);
$pop3 = new POP3($server, $username, $password, $port, $apop);
$pop3->Open();
$message = $pop3->GetMessage($ms);
$s = $pop3->Stats();
$mailsum = $s["message"];
$body = $message["body"];
$header = $message["header"];
$full = $message["full"];
$pop3->Close();
//echo $full;
$d = new DecodeMessage();
if (defined('_MD_WEBMAIL_READMAIL_DATEFORMAT')) {
$d->dateformat = _MD_WEBMAIL_READMAIL_DATEFORMAT;
}
if (defined('_MD_WEBMAIL_WEEKDAYS')) {
$d->weekdays = explode(',', _MD_WEBMAIL_WEEKDAYS);
}