telnet实现简单的邮件发送

下面的命令为单条输入执行


%创建连接%
telnet smtp.126.com 25 

%登录服务器%
EHLO 126.com
auth login 
base编码的邮箱名
base编码的邮箱密码

%添加地址%
mail from:
rcpt to:


%添加邮件数据%
data
From: Bob Example
To: Alice Example
Cc: [email protected]
subject:sub
Date: Tue, 15 January 2008 16:02:43 -0500

%标题栏和正文之间必须有空格%
Hello Alice.
This is a test message with 5 header fields and 4 lines in the message body.
Bob
.

%正文以. 结束%

QUIT


实验图:

telnet实现简单的邮件发送_第1张图片


SMTP协议详解:https://blog.csdn.net/sinat_36219858/article/details/71069515

c++实现发邮件:https://blog.csdn.net/sinat_36219858/article/details/80439782



------------------------------------------------

你可能感兴趣的:(dos,SMTP)