diff --git a/docs-core/src/main/java/com/sismics/docs/core/service/InboxService.java b/docs-core/src/main/java/com/sismics/docs/core/service/InboxService.java
index 2df5c6e5..a7bc1ecd 100644
--- a/docs-core/src/main/java/com/sismics/docs/core/service/InboxService.java
+++ b/docs-core/src/main/java/com/sismics/docs/core/service/InboxService.java
@@ -18,6 +18,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.mail.*;
+import javax.mail.search.FlagTerm;
import java.util.Date;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
@@ -114,7 +115,7 @@ public class InboxService extends AbstractScheduledService {
Folder inbox = null;
try {
inbox = openInbox();
- return inbox.getMessageCount();
+ return inbox.search(new FlagTerm(new Flags(Flags.Flag.SEEN), false)).length;
} catch (Exception e) {
log.error("Error testing inbox", e);
return -1;
diff --git a/docs-web/src/main/webapp/src/index.html b/docs-web/src/main/webapp/src/index.html
index 77aff9d3..303592ea 100644
--- a/docs-web/src/main/webapp/src/index.html
+++ b/docs-web/src/main/webapp/src/index.html
@@ -118,7 +118,7 @@
Sismics Docs
- {{ appName }}
+ {{ appName }}
diff --git a/docs-web/src/main/webapp/src/locale/en.json b/docs-web/src/main/webapp/src/locale/en.json
index ba2e90d7..c592b965 100644
--- a/docs-web/src/main/webapp/src/locale/en.json
+++ b/docs-web/src/main/webapp/src/locale/en.json
@@ -363,7 +363,7 @@
},
"inbox": {
"title": "Inbox scanning",
- "message": "By enabling this feature, the system while periodically scan the specified inbox for new emails and automatically import them.",
+ "message": "By enabling this feature, the system will scan the specified inbox every 15 minutes for unread emails and automatically import them.
After importing an email, it will be marked as read.
Configuration settings for Gmail, Outlook.com, Yahoo.",
"enabled": "Enable inbox scanning",
"hostname": "IMAP hostname",
"port": "IMAP port (143 or 993)",
@@ -371,8 +371,8 @@
"password": "IMAP password",
"tag": "Tag added to imported documents",
"test": "Test the parameters",
- "last_sync": "Last synchronization: {{ data.date | date }}, {{ data.count }} message{{ data.count > 1 ? 's' : '' }} imported",
- "test_success": "The connection to the inbox is successful ({{ count }} message{{ count > 1 ? 's' : '' }})",
+ "last_sync": "Last synchronization: {{ data.date | date: 'medium' }}, {{ data.count }} message{{ data.count > 1 ? 's' : '' }} imported",
+ "test_success": "The connection to the inbox is successful ({{ count }} unread message{{ count > 1 ? 's' : '' }})",
"test_fail": "An error occurred while connecting to the inbox, please check the parameters"
},
"log": {
diff --git a/docs-web/src/main/webapp/src/partial/docs/settings.inbox.html b/docs-web/src/main/webapp/src/partial/docs/settings.inbox.html
index 75e01924..e6d06e08 100644
--- a/docs-web/src/main/webapp/src/partial/docs/settings.inbox.html
+++ b/docs-web/src/main/webapp/src/partial/docs/settings.inbox.html
@@ -73,4 +73,6 @@