telnet实现简单的邮件发送
程序员文章站
2022-03-18 09:35:13
...
下面的命令为单条输入执行
%创建连接%
telnet smtp.126.com 25
%登录服务器%
EHLO 126.com
auth login
base编码的邮箱名
base编码的邮箱密码
%添加地址%
mail from:<aaa@qq.com>
rcpt to:<aaa@qq.com>
%添加邮件数据%
data
From: Bob Example
To: Alice Example
Cc: aaa@qq.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.csdn.net/sinat_36219858/article/details/71069515
c++实现发邮件:https://blog.csdn.net/sinat_36219858/article/details/80439782
------------------------------------------------