Posted on 2011-12-13 14:21
Prayer 閱讀(1727)
評論(0) 編輯 收藏 引用 所屬分類:
SOCKET
[root@localhost ~]# telnet smtp.126.com 25
Trying 202.108.5.141...
Connected to smtp.126.com (202.108.5.141).
Escape character is '^]'.
220 126.com Anti-spam GT for Coremail System (126com[071018])
ehlo ###@126.com //###代表你的126郵箱用戶名
250-mail
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250 8BITMIME
auth login
334 dXNlcm5hbWU6
### //###代表你的126郵箱用戶名的base64編碼
334 UGFzc3dvcmQ6
### //###代表你的126郵箱密碼的base64編碼
235 Authentication successful
mail from:<###@126.com> //###@126.com代表你的126郵箱地址
250 Mail OK
rcpt to:<###@mail.psychcn.com> //###@mail.psychcn.com
250 Mail OK
data
354 End data with <CR><LF>.<CR><LF>
subject: How to use telnet to send mail
Content-Type: multipart/mixed; boundary=a
--a
Content-Disposition: attachment; filename="1.txt" //附件
--a
.
250 Mail OK queued as smtp4,jdKowLB7CjgufrJIgl6YIA==.63330S2 1219657375
quit
221 Bye
Connection closed by foreign host.