『转』CMD中telnet命令发邮件

以126邮箱为例:

1. telnet smtp.126.com 25

回车后返回:

220 126.com Anti-spam GT for Coremail System (126com[20111010])

  1. **helo *** ****     **(***是你的称呼)

回车后返回:

250-mail
250-PIPELINING
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-coremail 1Uxr2xKj7kG0xkI17xGrU7I0s8FY2U3Uj8Cz28x1UUUUU7Ic2I0Y2UFDikmCUCa0xD
UUUUj
250-STARTTLS
250 8BITMIME

3. AUTH LOGIN

回车后返回:

334 dXNlcm5hbWU6

4.**** (此处输入你126账号的base64编码)

回车后返回:

334 UGFzc3dvcmQ6

5.****(此处输入你126邮箱的密码的base64编码)

回车后返回:

235 Authentication successful

6.mail from < ***@126.com>

回车后返回:

250 Mail OK

7.rcpt to <60462***@qq.com>

回车后返回:

250 Mail OK

8.data

回车显示:

354 End data with .

9.依次输入

from:***@126.com(输完后回车)

subject:hello haha

下面需要输入正文,

输入正文前要空一行,敲回车

 

“这里是正文信息,祝大家实验顺利!!!”

10.正文完毕后,回车,

以"." 表示结束,发送邮件。

返回类似这样的信息:

250 Mail OK queued as smtp6,j9KowLDLJl6zvKpOqxAVAQ--.2456S2 1319812760

参考:

SMTP协议初探

本文章迁移自http://blog.csdn.net/timberwolf_2012/article/details/25902755

/** * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS. * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/ /* var disqus_config = function () { this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable }; */ (function() { // DON'T EDIT BELOW THIS LINE var d = document, s = d.createElement('script'); s.src = 'https://chenzz.disqus.com/embed.js'; s.setAttribute('data-timestamp', +new Date()); (d.head || d.body).appendChild(s); })();