If verify_peer goes wrong, the errormessage is "Code 220 (2.2.0 Ready to start TLS). Maybe something goes wrong at socket->connect?