0
添付ファイルが送信者の署名イメージであるかどうかを特定し、その種類の添付ファイルをスキップしたいので無視する必要があります。その特定の添付ファイルは署名画像です。Java EWS-添付ファイルが送信者の署名イメージであるかどうかを確認する方法
また、署名イメージを追加している間にユーザーがカスタムプロパティを追加できるので、そのプロパティをプログラムで探すことができますか?
if (emailMessage.getHasAttachments() || emailMessage.getAttachments().getItems().size() > 0) {
//get all the attachments
AttachmentCollection attachmentsCol = emailMessage.getAttachments();
log.info("File Count: " + attachmentsCol.getCount());
Attachment attachment = attachmentsCol.getPropertyAtIndex(i);
//log.debug("Starting to process attachment "+ attachment.getName());
//do we need to skip this attachment
FileAttachment fileAttachment = (FileAttachment) attachment;
// if we don't call this, the Content property may be null.
fileAttachment.load();
booelan isSignatureImage = fileAttachment.isContactPhoto(); // this is false
}
}