Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
Issue #202
  • Loading branch information
rsoika committed Jan 16, 2024
1 parent e1c28ae commit 328cf47
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import jakarta.mail.Store;
import jakarta.mail.internet.InternetAddress;
import jakarta.mail.internet.MimeBodyPart;
import jakarta.mail.internet.MimeUtility;

/**
* The EmailImportAdapter scans a IMAP account
Expand Down Expand Up @@ -287,6 +288,10 @@ public void onEvent(@Observes DocumentImportEvent event) {
logger.warning("...skip detaching file, because of missing filename");
continue; // skip this attachment
}

// decode filename (issue #202)
fileName = MimeUtility.decodeText(fileName);

// detach only add PDF files?
if (DETACH_MODE_PDF.equals(detachOption)) {
if (!fileName.toLowerCase().endsWith(".pdf")) {
Expand Down

0 comments on commit 328cf47

Please sign in to comment.