diff options
Diffstat (limited to 'src/main/java/org/traccar/database/MailManager.java')
-rw-r--r-- | src/main/java/org/traccar/database/MailManager.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/database/MailManager.java b/src/main/java/org/traccar/database/MailManager.java index 8a2f002cd..d94f55cda 100644 --- a/src/main/java/org/traccar/database/MailManager.java +++ b/src/main/java/org/traccar/database/MailManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 - 2018 Anton Tananaev (anton@traccar.org) + * Copyright 2016 - 2021 Anton Tananaev (anton@traccar.org) * Copyright 2017 - 2018 Andrey Kunitsyn (andrey@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -87,6 +87,10 @@ public final class MailManager { return properties; } + public boolean getEmailEnabled() { + return Context.getConfig().hasKey("mail.smtp.host"); + } + public void sendMessage( long userId, String subject, String body) throws MessagingException { sendMessage(userId, subject, body, null); |