[笔记]POP3 协议详解
最近做一个邮件分析的东东,要用到POP3的协议,于是学习了一下,下一篇将给出这个协议的PHP实现。
USER userid
This must be the first command after the connect. Supply your e-mail
userid (not the full e-mail address). Example: USER john.smith
一看就知道,是提交用户名的
---------------------------------
PASS password
This must be the next command after USER. Supply your e-mail password. The password may be case sensitive.
密码 ,提交了这个,会导致连接状态发生变化,呵呵,变成可以执行以下命令的状态(当然是密码正确的情形下)
---------------------------------
The following commands may be used as needed:(下面的命令可以根据需要来使用)
STAT
The response to this is: +OK #msgs #bytes Where #msgs is the number of
messages in the mail box and #bytes is the total bytes used by all
messages. Sample response: +OK 3 345910
查看连接状态,这个只是用来看连接状态的。
-------------------------
LIST
The response to this lists a line for each message with its number and
size in bytes, ending with a period on a line by itself. Sample
response:
+OK 3 messages
1 1205
2 305
3 344400
.
列出所有邮件
-----------------------------
RETR msg#
This sends message number msg# to you (displays on the Telnet screen). You probably don't want to do this in
Telnet (unless you have turned on Telnet logging). Example: RETR 2
用邮件标识符来查看该邮件的所有内容
------------------------------
TOP msg# #lines
This is an optional POP3 command. Not all POP3 servers support it. It lists the header for msg# and the first #lines of the
message text. For example, TOP 1 0 would list just the headers for message 1, where as TOP 1 5 would list the headers
and first 5 lines of the message text.
查看第N个邮件的前lines行
-------------------------------
DELE msg#
This marks message number msg# for deletion from the server. This is the way to get rid a problem causing message.
It is not actually deleted until the QUIT command is issued. If you lose the connection to the mail server before issuing the
QUIT command, the server should not delete any messages. Example: DELE 3
删除邮件
----------------------------------
RSET
This resets (unmarks) any messages previously marked for deletion in this session so that the QUIT command will not delete them.
重置
-----------------------------
QUIT
This deletes any messages marked for deletion, and then logs you off of the mail server. This is the last command to use.
This does not disconnect you from the ISP, just the mailbox.
退出
----------------------------------
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 通过 API 将Deepseek响应流式内容输出到前端
· 因为Apifox不支持离线,我果断选择了Apipost!
2008-04-23 Team Foundation Server安装指南
2008-04-23 黑莓使用必看帖子大汇集(转载)