Replies: 1 comment
|
把smtp_client里面的函数简化一下看看,改成这样: void upgrade_to_ssl() {
#ifdef CINATRA_ENABLE_SSL
asio::ssl::context ctx(asio::ssl::context::tlsv12_client);
ssl_socket_ = std::make_unique<asio::ssl::stream<asio::ip::tcp::socket &>>(
socket_, ctx);
ssl_socket_->set_verify_mode(asio::ssl::verify_none);
std::error_code ec;
ssl_socket_->handshake(asio::ssl::stream_base::client, ec);
#endif
} |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
使用cinatra发邮件发送邮件,尝试了很多次都不成功。cinatra发送邮件代码如下:
而使用其他发送邮件的功能模块,可以正常发送,测试示例代码如下:
以下为发送邮件的功能代码:
All reactions