Introduction to the POP protocol
This paper briefly describes the principle of receiving the decoding of mail and MIME messages through the POP3 protocol, and provides two useful PHP classes for collecting and mime decoding, and provides examples of using. It is divided into two parts: Mail charge and MIME decoding. Here we first introduce you to the mail collection, decoding part will be in a future article for you detailed introduction, please pay attention.
Now the largest application on the Internet should be non-email, we are accustomed to daily through the exchange of email, the major sites have also almost launched their own web-based free mail system. In this article, I will introduce some of the principles of e-mail implementation. At the same time, we assume that you have a certain basis for PHP programming, the TCP/IP protocol also has a certain understanding.
Introduction to the POP protocol
The full name of the pop is the post Office Protoco, the Post Office Protocol, which is used for e-mail reception, and is now commonly used in the third edition, referred to as POP3. Through the POP protocol, after the client logs on to the server, can delete their own messages, or download to the local, after downloading, the e-mail client software can be local to the message to modify, delete, and so on. Another message for receiving letters is the IMAP protocol, which is now developing quickly, and we will not discuss it in this article.
The POP server typically uses TCP port 110th, and if you use Foxmail, you can see some of the commands in the message prompt window when you receive it:
"Connecting to 62.123.23.123:110";
"USER boss_ch";
"PASS ...";; ";";
Let's look at a transcript of a conversation with the POP3 server:
Telenet pop.china.com 110
+ok AIMC POP Service (mail2.china.com) is ready.
USER boss_ch
+ok Enter password for user.
PASS ******
+ok Boss_ch has 1 messages (octets)
STAT
+ok 1 750
LIST
+ok 1 messages (octets)
1 750
RETR 1
+ok octets
Received:from smtp2.ptt.js.cn ([202.102.24.37]) by china.com (JetMail 2.5.3.0)
with SMTP ID jm4839cc4227; Sat, SEP 2000 05:31:21-0000
Received:from chenjunqing ([61.155.120.6]) by smtp2.ptt.js.cn
(Netscape Messaging Server 4.15) with SMTP ID g1brhj03. V07 for
; Sat, SEP 2000 13:34:31 +0800
Date:sat, SEP 2000 13:34:18 +0800
From: =? Iso-8859-1? q?=b3=c2=bf=a1=c7=e5?=
http://www.bkjia.com/PHPjc/445246.html www.bkjia.com true http://www.bkjia.com/PHPjc/445246.html techarticle Introduction to the POP protocol This paper briefly describes the principle of receiving the decoding of mail and MIME messages through the POP3 protocol, and provides two useful PHP classes for collecting and mime decoding, and provides the use of the sample ...