From 6f31573f00d85bb1d24536c917d72ed80156fd6c Mon Sep 17 00:00:00 2001 From: Ben Komalo Date: Sun, 10 Jul 2011 17:58:06 -0700 Subject: [PATCH] Support SMTP servers not requiring auth We were unconditionally setting auth credentials even if the checkbox to require credentials was unchecked. This prevented setup for certain outgoing servers Bug: 4291105 Change-Id: I27f94f02b85b097d2c6dbb896254367e8a15415b --- .../activity/setup/AccountSetupOutgoingFragment.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/com/android/email/activity/setup/AccountSetupOutgoingFragment.java b/src/com/android/email/activity/setup/AccountSetupOutgoingFragment.java index 538fc99fa..0443cdc3e 100644 --- a/src/com/android/email/activity/setup/AccountSetupOutgoingFragment.java +++ b/src/com/android/email/activity/setup/AccountSetupOutgoingFragment.java @@ -349,9 +349,13 @@ public class AccountSetupOutgoingFragment extends AccountServerBaseFragment Account account = SetupData.getAccount(); HostAuth sendAuth = account.getOrCreateHostAuthSend(mContext); - String userName = mUsernameView.getText().toString().trim(); - String userPassword = mPasswordView.getText().toString(); - sendAuth.setLogin(userName, userPassword); + if (mRequireLoginView.isChecked()) { + String userName = mUsernameView.getText().toString().trim(); + String userPassword = mPasswordView.getText().toString(); + sendAuth.setLogin(userName, userPassword); + } else { + sendAuth.setLogin(null, null); + } String serverAddress = mServerView.getText().toString().trim(); int serverPort;