Home php教程 php手册 pop3邮件收取一例

pop3邮件收取一例

Jun 13, 2016 am 10:31 AM
head html pop3 test title mainstream develop now language mail

test_pop3.php(做为现在的主流开发语言)



Test for Manuel Lemoss php<font class="reblank">(做为现在的主流开发语言)</font> POP3 class



require("pop3.php(做为现在的主流开发语言)");

$user="user";
$password="passwd";
$apop=0;
$pop3_connection=new pop3_class;
$pop3_connection->hostname="mail.xiaocui.com";
if(($error=$pop3_connection->Open())=="")
{
   echo "
Connected to the POP3 server "$pop3_connection->hostname".
Copy after login
";
   if(($error=$pop3_connection->Login($user,$password,$apop))=="")
   {
      echo "
User "$user" logged in.
Copy after login
";
      if(($error=$pop3_connection->Statistics(&$messages,&$size))=="")
      {
         echo "
There are <b>$messages</b> messages in the mail box with a total of <b>$size</b> bytes.
Copy after login
";
         $result=$pop3_connection->ListMessages("",0);
         if(GetType($result)=="array")
         {
            for(Reset($result),$message=0;$message               echo "
Message ",Key($result)," - ",$result[Key($result)]," bytes.
Copy after login
";
             if($messages>0)
            {
                if(($error=$pop3_connection->RetrieveMessage(1,&$headers,&$body,-1))=="")
                {
                  echo "
Message 1:
---Message headers starts below---
Copy after login
";
                  for($line=0;$line                     echo "
",HtmlSpecialChars($headers[$line]),"
Copy after login
";
                  echo "
---Message headers ends above---
---Message body starts below---
Copy after login
";
                  for($line=0;$line                     echo "
",HtmlSpecialChars($body[$line]),"
Copy after login
";
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Huawei Watch GT 5 smartwatch gets update with new features Huawei Watch GT 5 smartwatch gets update with new features Oct 03, 2024 am 06:25 AM

Huawei is rolling out software version 5.0.0.100(C00M01) for the Watch GT 5 and the Watch GT 5 Prosmartwatchesglobally. These two smartwatches recently launched in Europe, with the standard model arriving as the company’s cheapest model. This Harmony

Tekken\'s Colonel Sanders dream fried by KFC Tekken\'s Colonel Sanders dream fried by KFC Oct 02, 2024 am 06:07 AM

Katsuhiro Harada, the Tekken series director, once seriously tried to bring Colonel Sanders into the iconic fighting game. In an interview with TheGamer, Harada revealed that he pitched the idea to KFC Japan, hoping to add the fast-food legend as a g

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

New Xiaomi Mijia Graphene Oil Heater with HyperOS arrives New Xiaomi Mijia Graphene Oil Heater with HyperOS arrives Oct 02, 2024 pm 09:02 PM

Xiaomi will shortly launch the Mijia Graphene Oil Heater in China. The company recently ran a successful crowdfunding campaign for the smart home product, hosted on its Youpin platform. According to the page, the device has already started to ship to

The Roles of HTML, CSS, and JavaScript: Core Responsibilities The Roles of HTML, CSS, and JavaScript: Core Responsibilities Apr 08, 2025 pm 07:05 PM

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

From HTML to PHP: Taking Your Web Skills to the Next Level From HTML to PHP: Taking Your Web Skills to the Next Level Oct 10, 2024 am 10:25 AM

To transition from static HTML websites to dynamic web applications, you need to learn PHP (Hypertext Preprocessing Language). PHP is a scripting language that can be used for server-side processing such as form processing and database operations to create interactive and dynamic websites.

Understanding HTML, CSS, and JavaScript: A Beginner's Guide Understanding HTML, CSS, and JavaScript: A Beginner's Guide Apr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

React's Role in HTML: Enhancing User Experience React's Role in HTML: Enhancing User Experience Apr 09, 2025 am 12:11 AM

React combines JSX and HTML to improve user experience. 1) JSX embeds HTML to make development more intuitive. 2) The virtual DOM mechanism optimizes performance and reduces DOM operations. 3) Component-based management UI to improve maintainability. 4) State management and event processing enhance interactivity.

See all articles