Fetch SMTP max message size

This commit is contained in:
M66B
2020-07-01 23:34:53 +02:00
parent e109fa4b46
commit b39ed003b6
8 changed files with 2310 additions and 4 deletions

View File

@@ -634,6 +634,17 @@ public class EmailService implements AutoCloseable {
return (SMTPTransport) iservice;
}
Integer getMaxSize() {
SMTPTransport transport = getTransport();
String size = transport.getExtensionParameter("SIZE");
if (!TextUtils.isEmpty(size) && TextUtils.isDigitsOnly(size))
return Integer.parseInt(size);
return null;
}
boolean hasCapability(String capability) throws MessagingException {
Store store = getStore();
if (store instanceof IMAPStore)