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 4b71cf5ccb
commit 3e61f32493
1 changed files with 3 additions and 5 deletions

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();
}
}
}
}