Change respons parsing to only look for the correct response code. This solves the problem with servers either responding with 220 Go ahead with TLS or 220 Ready to start TLS (see RFC 3207 for confusion.)