Update DownloadEmailAttachments.java
changes as per review comments
This commit is contained in:
parent
4b71cf5ccb
commit
3e61f32493
|
@ -35,11 +35,9 @@ public class DownloadEmailAttachments {
|
||||||
Address[] fromAddress = message.getFrom();
|
Address[] fromAddress = message.getFrom();
|
||||||
String from = fromAddress[0].toString();
|
String from = fromAddress[0].toString();
|
||||||
String subject = message.getSubject();
|
String subject = message.getSubject();
|
||||||
String sentDate = message.getSentDate()
|
String sentDate = message.getSentDate().toString();
|
||||||
.toString();
|
|
||||||
List<String> attachments = new ArrayList<String>();
|
List<String> attachments = new ArrayList<String>();
|
||||||
if (message.getContentType()
|
if (message.getContentType().contains("multipart")) {
|
||||||
.contains("multipart")) {
|
|
||||||
attachments = downloadAttachments(message);
|
attachments = downloadAttachments(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,4 +109,4 @@ public class DownloadEmailAttachments {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue