Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- EmailMessage message = EmailMessage.bind( ewsService,
- ExchangeID(), new PropertySet(BasePropertySet.IdOnly, ItemSchema.Attachments, ItemSchema.HasAttachments));
- for (int i = 0; i < message.getAttachments().getCount(); i++) {
- FileAttachment a = (FileAttachment)message.getAttachments().getPropertyAtIndex(i);
- if (a instanceof FileAttachment) {
- if (sWhichAttachments.toLowerCase().contains(a.getName().toLowerCase())) {
- String sFN = a.getName().toLowerCase();
- Attachment name: "
- ..
- File f = new File(d, sFN);
- FileOutputStream fos = new FileOutputStream(f);
- sDoing = ".load(*)";
- a.load();
- //((FileAttachment) a).load(fos);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement