mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-26 10:53:43 +02:00
Improved empty message check
This commit is contained in:
@@ -1458,6 +1458,20 @@ public class MessageHelper {
|
||||
return (html.size() == 0);
|
||||
}
|
||||
|
||||
boolean hasBody() throws MessagingException {
|
||||
List<Part> all = new ArrayList<>();
|
||||
all.addAll(plain);
|
||||
all.addAll(html);
|
||||
if (all.size() == 0)
|
||||
return true;
|
||||
|
||||
for (Part p : all)
|
||||
if (p.getSize() > 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Long getBodySize() throws MessagingException {
|
||||
Long size = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user