Update DownloadEmailAttachments.java

changes as per review comments
This commit is contained in:
rvsathe
2021-05-21 14:48:00 +05:30
committed by GitHub
parent b65f847b5e
commit e82b16b614

View File

@@ -35,11 +35,9 @@ public class DownloadEmailAttachments {
Address[] fromAddress = message.getFrom();
String from = fromAddress[0].toString();
String subject = message.getSubject();
String sentDate = message.getSentDate()
.toString();
String sentDate = message.getSentDate().toString();
List<String> attachments = new ArrayList<String>();
if (message.getContentType()
.contains("multipart")) {
if (message.getContentType().contains("multipart")) {
attachments = downloadAttachments(message);
}
@@ -111,4 +109,4 @@ public class DownloadEmailAttachments {
ex.printStackTrace();
}
}
}
}