Refactor sending STARTTLS