最近网易163/126/yeah邮箱全面打开SMTP/POP了,现在测试telnet到smtp服务器进行发信
[root@kindle ~]# telnet smtp.163.com 25
Trying 123.125.50.133…
Connected to smtp.163.com (123.125.50.133).
Escape character is ‘^]’.
EHLO 163.com
220 163.com Anti-spam GT for Coremail System (163com[20090903])
250-mail
250-PIPELINING
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-coremail 1Uxr2xKj7kG0xkI17xGrUDI0s8FY2U3Uj8Cz28x1UUUUU7Ic2I0Y2UrHMAyqUCa0xDrUUUUj
250 8BITMIME
AUTH LOGIN #登录认证
334 dXNlcm5hbWU6
a2luZGxlbGFpbA== #base64加密的用户名 这里是kindlelail
334 UGFzc3dvcmQ6
MTIzNDU2 #base64的密码 这里是123456
235 Authentication successful
mail from:<kindlelail@163.com>
250 Mail OK
rcpt to:<kindlelail@163.com>
250 Mail OK
data
354 End data with <CR><LF>.<CR><LF>
rcpt to:<linuxroorkits@gmail.com>
from:<kindlelail@163.com>
to:<kindlelail@163.com>
subject:
hello kindle!!!
.
250 Mail OK queued as smtp3,DdGowKArD1jIqFpLQNscBA–.23003S2 1264232723
Connection closed by foreign host.
[root@kindle ~]# python
Python 2.4.3 (#1, Jun 11 2009, 14:09:58)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import base64
>>> base64.encodestring(‘kindlelail’)
‘a2luZGxlbGFpbA==
‘
>>> base64.encodestring(‘123456’)
‘MTIzNDU2
‘
只要发送标准的smtp协议就可以发信了,不过用户名和密码都是需要输入加密后的字符。