<?php
// vi: expandtab sw=4 ts=4 sts=4 nowrap nu:
/**
*
* @author: j0inty.sL
* @email: bestmischmaker@web.de
*/
error_reporting(E_ALL);
$strRootPath = dirname(__FILE__) . DIRECTORY_SEPARATOR;
require_once( $strRootPath ."pop3.class.php5.inc");
echo $strRootPath ."pop3.class.php5.inc";
// Socket Options
/**
* Remember that the encryption support doesn't work at time for the socket extension
* This will I implement later.
*
*/
$bUseSockets = FALSE;
$bUseTLS = TRUE;
$bIPv6 = FALSE;
$arrConnectionTimeout = array( "sec" => 10,
"usec" => 500 );
// POP3 Options
$strProtocol= "tls";
$strHost = "pop.gmail.com";
$intPort = 995;
$strUser = "test21";
$strPass = "test32";
$bAPopAutoDetect = TRUE;
$bHideUsernameAtLog = FALSE;
// Logging Options
$strLogFile = "php://stdout";//$strRootPath. "pop3.log";
// EMail store Sptions
$strPathToDir = $strRootPath."mails" .DIRECTORY_SEPARATOR;
$strFileEndings = ".eml";
try
{
// Instance the POP3 object
$objPOP3 = new POP3( $strLogFile, $bAPopAutoDetect, $bHideUsernameAtLog, $strProtocol, $bUseSockets );
// Connect to the POP3 server
$objPOP3->connect($strHost,$intPort,$arrConnectionTimeout,$bIPv6);
// Logging in
$objPOP3->login($strUser, $strPass);
// Get the office status
$arrOfficeStatus = $objPOP3->getOfficeStatus();
/**
* This for loop store the messages under their message number on the server
* and mark the message as delete on the server.
*/
for($intMsgNum = 1; $intMsgNum <= $arrOfficeStatus["count"]; $intMsgNum++ )
{
$objPOP3->saveToFileFromServer($intMsgNum, $strPathToDir, $strFileEndings);
// $objPOP3->deleteMsg($intMsgNum);
}
// Send the quit command and all as delete marked message will remove from the server.
// IMPORTANT:
// If you deleted many mails it could be that the +OK response will take some time.
$objPOP3->quit();
// Disconnect from the server
// !!! CAUTION !!!
// - this function does not send the QUIT command to the server
// so all as delete marked message will NOT delete
// To delete the mails from the server you have to send the quit command themself before disconnecting from the server
$objPOP3->disconnect();
}
catch( POP3_Exception $e )
{
die($e);
}
// Your next code
?>
没有合适的资源?快使用搜索试试~ 我知道了~
pop3.class.php5.inc
共14个文件
mht:11个
inc:2个
php:1个
5星 · 超过95%的资源 需积分: 12 84 下载量 194 浏览量
2009-09-17
17:14:57
上传
评论
收藏 941KB RAR 举报
温馨提示
pop3.class.php5.inc 里面有类库和测试类,网上下载的没有如何修改,另外还添加了自己网上找到的资料
资源推荐
资源详情
资源评论
收起资源包目录
pop3.rar (14个子文件)
pop3
问专家-用PHP实现POP3邮件的解码.mht 122KB
pop3_test.php5.php 2KB
用PHP实现POP3邮件的解码(一) - 王朝网络 - wangchao.org.mht 172KB
用PHP实现POP3邮件的解码(二) - 王朝网络 - wangchao.org.mht 186KB
用PHP实现POP3邮件的收取(一) - 王朝网络 - wangchao.org.mht 176KB
php教程_用php实现pop3邮件的收取 -教程资料网 www.zhiweinet.com.mht 201KB
用PHP实现POP3邮件的解码(三) - 王朝网络 - wangchao.org.mht 209KB
pop3邮件收取一例_php实例-虚拟主机资讯_虚拟主机动态.mht 308KB
pop3.class.php5.inc 25KB
POP3、SMTP邮件收发程序 - PHP - 编程文档 - 编程论坛.mht 266KB
问专家-用PHP实现POP3邮件的收取.mht 113KB
用PHP实现POP3邮件的收取(二) - 王朝网络 - wangchao.org.mht 196KB
pop3.class.inc 39KB
用PHP实现POP3邮件的收取(三) - 王朝网络 - wangchao.org.mht 168KB
共 14 条
- 1
yw1386
- 粉丝: 117
- 资源: 18
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页