Check certificate can be disabled. Fixed #324: reconnect SMTP properly after it's been disconnected.