现在的位置: 首页 > 综合 > 正文

没有邮件客户端? 用telnet可以收发邮件!

2012年09月01日 ⁄ 综合 ⁄ 共 694字 ⁄ 字号 评论关闭
telnet到服务器的25号端口,就可以利用服务器的smtp服务发送邮件了。
下面是我在公司测试的代码,粗体部分为命令。

telnet mail.lypower.com.cn
220 mail.lypower.com.cn Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 ready at  Fri, 9 May 2008 10:51:50 +0800

helo
250 mail.lypower.com.cn Hello [192.168.50.8]

mail from:xuminghui@lypower.com.cn
250 2.1.0 xuminghui@lypower.com.cn....Sender OK

rcpt to:xuminghui@lypower.com.cn
250 2.1.5 xuminghui@lypower.com.cn

data
354 Start mail input; end with <CRLF>.<CRLF>
hello,xuminghui.
this email is from the telnet port 25.
the command line is :
helo
mail from:xuminghui@lypower.com.cn
rcpt to:xuminghui@lypower.com.cn
data
--here input the message--
ok.the end.
send by pangpang,xuminghui,haha
over

.
250 2.6.0 <MAILTWpSewau9E3RCmR00000001@mail.lypower.com.cn> Queued mail for delivery

抱歉!评论已关闭.