1.郵件發送使用的協議SMTP協議和POP協議
SMTP協議:Sample Message Transfer Protocol郵件發送協議,默認端口:25
POP協議:Post office Protocol 郵件接收協議,默認端口爲110
2. 手工發送郵件
telnet smtp.163.com 25 //鏈接163的郵件服務器
ehlo hello //向服務器打招呼
auth login //請求認證
YmFvcWluZzA3MjhAMTYzLmNvbQ== //賬號(也就是你的郵箱注意:郵箱和麪膜都是
進過base64編碼的)
NTYzNjQ5dsOTgw //密碼,注意密碼是要進過base64編碼的,這是由SMTP協議規定的
mail from:<[email protected]> //發送郵件人的地址
rcpt to:<[email protected]> //收信人的地址
data //開始寫郵件內容
from:[email protected]
to:[email protected]
subject: This is my first mail
hello world
.
quit
手工接收郵使用的是POP協議
telnet pop.163.com 110
user baoqing0728
pass 000000000000
stat //用作查看郵件的個數,返回
+OK 25 11112124 //25表示25封郵件,總大小11112124
list 1 //第一封郵件的信息
retr 1 //查看第一封郵件的內容