aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/database
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-27 16:51:51 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-27 16:51:51 -0700
commit2812c02d18ccf3ad9fadab921516cd5ff8755668 (patch)
tree3f33927e360d34475296745511debe2e12722e2a /src/main/java/org/traccar/database
parentbf0173eb4bac4ab86b43f101eb013051bfc40817 (diff)
downloadtrackermap-server-2812c02d18ccf3ad9fadab921516cd5ff8755668.tar.gz
trackermap-server-2812c02d18ccf3ad9fadab921516cd5ff8755668.tar.bz2
trackermap-server-2812c02d18ccf3ad9fadab921516cd5ff8755668.zip
Missing SMTP config error
Diffstat (limited to 'src/main/java/org/traccar/database')
-rw-r--r--src/main/java/org/traccar/database/MailManager.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main/java/org/traccar/database/MailManager.java b/src/main/java/org/traccar/database/MailManager.java
index ac0db2d97..0c868e1fc 100644
--- a/src/main/java/org/traccar/database/MailManager.java
+++ b/src/main/java/org/traccar/database/MailManager.java
@@ -16,8 +16,6 @@
*/
package org.traccar.database;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.traccar.config.Config;
import org.traccar.model.User;
import org.traccar.notification.PropertiesProvider;
@@ -38,8 +36,6 @@ import java.util.Properties;
public final class MailManager {
- private static final Logger LOGGER = LoggerFactory.getLogger(MailManager.class);
-
private final Config config;
private final StatisticsManager statisticsManager;
@@ -115,8 +111,7 @@ public final class MailManager {
properties = getProperties(new PropertiesProvider(config));
}
if (!properties.containsKey("mail.smtp.host")) {
- LOGGER.warn("No SMTP configuration found");
- return;
+ throw new RuntimeException("No SMTP configuration found");
}
Session session = Session.getInstance(properties);