diff --git a/res/values/strings.xml b/res/values/strings.xml
index 5f64deb5a..523cdba83 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -671,9 +671,10 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin
K-9 Mail remote control
Allows this application to control K-9 Mail activities and settings.
- Attachments On SD Cards
- Whether or not attachments are store on the SD card
+ Attachments on SD card
+ Whether or not attachments are stored on the SD card
No SD card found
No SD card found
+ No SD card found. Skipping accounts with 'Attachments on SD card' enabled.
diff --git a/src/com/fsck/k9/activity/Accounts.java b/src/com/fsck/k9/activity/Accounts.java
index 7a4154bac..98d1a6adf 100644
--- a/src/com/fsck/k9/activity/Accounts.java
+++ b/src/com/fsck/k9/activity/Accounts.java
@@ -376,13 +376,33 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
}
+ /*
+ * This method is called with 'null' for the argument 'account' if
+ * all accounts are to be checked. This is handled accordingly in
+ * MessagingController.checkMail().
+ */
private void onCheckMail(Account account)
{
- if (account.isStoreAttachmentOnSdCard()
- && !Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED))
+ if (account != null)
{
- Toast.makeText(this, R.string.sd_card_error, Toast.LENGTH_SHORT).show();
- return;
+ if (account.isStoreAttachmentOnSdCard()
+ && !Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED))
+ {
+ Toast.makeText(this, R.string.sd_card_error, Toast.LENGTH_SHORT).show();
+ return;
+ }
+ }
+ else
+ {
+ Account[] accounts = Preferences.getPreferences(this).getAccounts();
+ for (Account acc : accounts)
+ {
+ if (acc.isStoreAttachmentOnSdCard())
+ {
+ Toast.makeText(this, R.string.sd_card_skip, Toast.LENGTH_LONG).show();
+ break;
+ }
+ }
}
MessagingController.getInstance(getApplication()).checkMail(this, account, true, true, null);