C++;SSL SMTP服务器协议在StartSSL混乱之后 我需要在C++中编写一个定制的SMTP服务,有一个要求,它需要支持SSL,我一直在看这两个SMTP,但我不能计算出消息排序。我从一个邮件客户端获得以下信息

C++;SSL SMTP服务器协议在StartSSL混乱之后 我需要在C++中编写一个定制的SMTP服务,有一个要求,它需要支持SSL,我一直在看这两个SMTP,但我不能计算出消息排序。我从一个邮件客户端获得以下信息,c++,openssl,smtp,smtp-auth,C++,Openssl,Smtp,Smtp Auth,从邮件客户端接收的邮件: [Received from client] EHLO PAULMORRISSAB5A [Received from client] STARTTLS [Received from client] ▬▬☺ 最后一条消息是什么?服务器应回复什么?使用STARTTLS(无身份验证)与smtp服务器建立SSL连接: S: C: S:220 mail.imc.org SMTP服务就绪 C:EHLO mail.example.com\r\n S:250-mail.imc.org

从邮件客户端接收的邮件:

[Received from client] EHLO PAULMORRISSAB5A
[Received from client] STARTTLS
[Received from client] ▬▬☺

最后一条消息是什么?服务器应回复什么?

使用STARTTLS(无身份验证)与smtp服务器建立SSL连接:

S:
C:
S:220 mail.imc.org SMTP服务就绪
C:EHLO mail.example.com\r\n
S:250-mail.imc.org热烈欢迎您的到来
S:250-8比特
S:250-STARTTLS
S:250 DSN
C:STARTTLS\r\n
S:220请讲
例如,C++中的OpenSSL部分(不需要发送这3行)
C:
C&S:
C&S:
C:EHLO mail.example.com\r\n
S:250-mail.imc.org轻轻地抚摸你的手一会儿
S:250-8比特
S:250 DSN
C:邮件发件人:\r\n
S:250好的
C:rcpt收件人:\r\n
S:250好的
C:数据\r\n
S:354去阿德
C:发件人:\r\n
C:收件人:\r\n
C:主题:Hello costam\r\n
C:
C:您好,来自smtp电子邮件
C:
C:。
S:250列为5s4f564ds65f4
C:退出
S:221再见。。。

简单C++ SSL客户端:


它看起来像Base64填充(UUencoding?)的结尾,然后是一个垃圾字符。@jww,那么::recv()已损坏?客户端的链接是404
S: <waits for connection on TCP port 25>
C: <opens connection>
S: 220 mail.imc.org SMTP service ready
C: EHLO mail.example.com\r\n
S: 250-mail.imc.org offers a warm hug of welcome
S: 250-8BITMIME
S: 250-STARTTLS
S: 250 DSN
C: STARTTLS\r\n
S: 220 Go ahead
    C: <starts TLS negotiation>
    C & S: <negotiate a TLS session>
    C & S: <check result of negotiation>
C: EHLO mail.example.com\r\n
S: 250-mail.imc.org touches your hand gently for a moment
S: 250-8BITMIME
S: 250 DSN
C: mail from: <email>\r\n
S: 250 OK
C: rcpt to: <email@com.com>\r\n
S: 250 OK
C: DATA\r\n
S: 354 Go adead
C: From: <email>\r\n
C: To: <email@email.to>\r\n
C: Subject: Hello costam\r\n
C:
C: Hello from email smtp
C: 
C: .
S: 250 qued as 5s4f564ds65f4
C: quit
S: 221 Bye...