Receive before sending

pull/215/head
M66B 6 months ago
parent 9d1e85ff64
commit 7d4429bd66

@ -76,6 +76,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import javax.mail.Folder;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
@ -1115,6 +1116,13 @@ public class FragmentIdentity extends FragmentBase {
if (a != null)
try (EmailService iaccount = new EmailService(context, a, EmailService.PURPOSE_CHECK, true)) {
iaccount.connect(a);
Folder ifolder = iaccount.getStore().getFolder("INBOX");
ifolder.open(Folder.READ_ONLY);
try {
ifolder.getMessages();
} finally {
ifolder.close();
}
}
}

@ -67,6 +67,7 @@ import java.util.concurrent.ExecutorService;
import javax.mail.Address;
import javax.mail.AuthenticationFailedException;
import javax.mail.Folder;
import javax.mail.MessageRemovedException;
import javax.mail.MessagingException;
import javax.mail.SendFailedException;
@ -803,6 +804,13 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
if (account != null)
try (EmailService iaccount = new EmailService(this, account, EmailService.PURPOSE_USE, debug)) {
iaccount.connect(account);
Folder ifolder = iaccount.getStore().getFolder("INBOX");
ifolder.open(Folder.READ_ONLY);
try {
ifolder.getMessages();
} finally {
ifolder.close();
}
}
EmailService iservice = new EmailService(this, ident, EmailService.PURPOSE_USE, debug);

@ -1245,7 +1245,7 @@
<string name="title_password">Password</string>
<string name="title_password_storage">How are passwords stored?</string>
<string name="title_case_sensitive">Usernames and passwords are usually case sensitive</string>
<string name="title_login_before_send">Login before sending</string>
<string name="title_login_before_send">Receive before sending</string>
<string name="title_client_certificate">Client certificate</string>
<string name="title_realm">Realm</string>
<string name="title_use_ip">Use local IP address instead of host name</string>

Loading…
Cancel
Save