下面的命令为单条输入执行
%创建连接%
telnet smtp.126.com 25
%登录服务器%
EHLO 126.com
auth login
base编码的邮箱名
base编码的邮箱密码
%添加地址%
mail from:<sender@126.com>
rcpt to:<receiver@126.com>
%添加邮件数据%
data
From: Bob Example
To: Alice Example
Cc: theboss@example.com
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
实验图:

SMTP协议详解:https://blog.youkuaiyun.com/sinat_36219858/article/details/71069515
c++实现发邮件:https://blog.youkuaiyun.com/sinat_36219858/article/details/80439782
------------------------------------------------

本文介绍通过SMTP协议发送邮件的具体步骤,包括创建连接、登录服务器、添加邮件地址和数据等过程,并提供了一个完整的命令示例。
631

被折叠的 条评论
为什么被折叠?



