最近网易163/126/yeah邮箱全面打开SMTP/POP了,现在测试telnet到smtp服务器进行发信
pywugw@pywugw.net:~$ telnet smtp.163.com 25
Trying 123.125.50.132...
Connected to smtp.163.split.netease.com.
Escape character is '^]'.
220 163.com Anti-spam GT for Coremail System (163com[20090903])
EHLO 163.com
250-mail
250-PIPELINING
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-coremail 1Uxr2xKj7kG0xkI17xGrUDI0s8FY2U3Uj8Cz28x1UUUUU7Ic2I0Y2Ur7EiCWUCa0xDrUUUUj
250 8BITMIME
AUTH LOGIN #登录认证
334 dXNlcm5hbWU6
cHl3dWd3 #base64加码的用户名 这里是pywugw
334 UGFzc3dvcmQ6
MTIzNDU2 #base64的密码
235 Authentication successful
mail from:<pywugw@163.com>
250 Mail OK
rcpt to:<pywugw@163.com>
250 Mail OK
data
354 End data with <CR><LF>.<CR><LF>
from:<pywugw@163.com>
to:<pywugw@163.com>
subject:test send mail
test contents
.
250 Mail OK queued as smtp2,DNGowKDbIgSAnFBLAAAAAA--.52825S2 1263574215
quit
221 Bye
Connection closed by foreign host.
|
Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import base64
>>> base64.encodestring('pywugw') #生成base64
'cHl3dWd3\n'
>>> base64.encodestring('123456')
'MTIzNDU2\n'
|
阅读(3700) | 评论(0) | 转发(0) |