使用telnet模拟smtp协议实现邮件客户端
简单邮件传输协议(Simple Mail Transfer Protocol)
用户代理(user agent)
邮件服务器(mail server)
命令行代码如下:
telnet smtp.163.com 25
220 163.com Anti-spam GT for Coremail System (163com[20141201])
HELO LC
250 OK
AUTH LOGIN
334 dXNlcm5hbWU6
==your username after base64 encode==
334 UGFzc3dvcmQ6
==your authority password after turnning on smtp==
235 Authentication successful
MAIL FROM:<lvchao1013@163.com>
250 Mail OK
RCPT TO:<987124487@qq.com>
250 Mail OK
DATA
354 End data with <CR><LF>.<CR><LF>
FROM: lvchao1013@163.com
TO: 987124487@qq.com
Subject: Demo
This is mt first demo!
smtp message.
.
250 Mail OK queued as smtp9,DcCowAAHNTpRHr5fBFmqSg--.22098S2 1606295285
QUIT
221 Bye