only log in to smtp server if username or password is set