Merge Dan Moore and Mytram versions
Modify starttls to make it more resistant
Version 0.19_01