How do I start TLS socket

Im trying to connect to a mail server and send mail through my own program.

After I connect to the server on port 587 I get to this point where I receive the following response:

220 2.0.0 Ready to start TLS.

Im not sure how to proceed from here. I cant just continue sending commands
Last edited on
Are you trying to roll your own code, or are you using a library like libcurl to do the grunt work for you?
https://curl.haxx.se/libcurl/
Im not using anything atm. What do you suggest? And is it possible to do what's necessary with c++ standard lib/includes?

> What do you suggest?
I suggested libcurl.

But if you want an OO'ified wrapper, then perhaps http://www.curlpp.org/

Or if you're willing to spend a lot of time learning some "big iron", perhaps https://www.boost.org/doc/libs/1_71_0/doc/html/boost_asio.html
But I'm not sure that has the depth of protocol support that libcurl has.

> And is it possible to do what's necessary with c++ standard lib/includes?
Strictly speaking, no.
Standard C++ knows nothing about networks - see http://www.cplusplus.com/reference/
Topic archived. No new replies allowed.