Added starttls and additional robustness