diff --git a/readme.md b/readme.md index fd9edd1..9bb4aa4 100644 --- a/readme.md +++ b/readme.md @@ -160,7 +160,6 @@ mails.bot= (Mail address of mailing bot) mails.storage= (Mail address of emails storage) mail.title.prefix = (Prefix for mail title - can be empty) mail.sender.enabled= (Boolean flag to set sending mail) -mail.receiver.enabled= (Boolean flag to set observing incoming mail) # slack slack.bot-token= slack.signing-secret= diff --git a/src/main/java/info/fingo/urlopia/config/mail/receive/MailReceiver.java b/src/main/java/info/fingo/urlopia/config/mail/receive/MailReceiver.java index 0ba8011..801ffba 100644 --- a/src/main/java/info/fingo/urlopia/config/mail/receive/MailReceiver.java +++ b/src/main/java/info/fingo/urlopia/config/mail/receive/MailReceiver.java @@ -43,9 +43,6 @@ public class MailReceiver extends Thread { @Value("${mail.receiver.idle.time}") private int keepAliveFreq; //time unit: milliseconds - @Value("${mail.receiver.enabled:true}") - private boolean isEnabled; - private Store store; private IMAPFolder inbox; @@ -136,7 +133,7 @@ private void keepInboxIdle() { @Override public void run() { - if (isEnabled){ + if (!host.isBlank()){ log.info("Initializing MailReceiver"); // Configuring the inbox diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 214a59c..9c78bde 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -45,7 +45,6 @@ mail.receiver.idle.time=300000 mails.bot= mails.storage= mail.sender.enabled=false -mail.receiver.enabled=false # slack slack.bot-token= slack.signing-secret=