aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/database/MailManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-07 06:48:53 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-07 06:48:53 -0700
commit8eecfdcf5c59f92158a6c339d1622e0e9d67968c (patch)
treef0bd5c9d391549ab7b98f87a86938a1341802a23 /src/main/java/org/traccar/database/MailManager.java
parent669bdccecff50eaca46c815598df092ad0fe143d (diff)
downloadtrackermap-server-8eecfdcf5c59f92158a6c339d1622e0e9d67968c.tar.gz
trackermap-server-8eecfdcf5c59f92158a6c339d1622e0e9d67968c.tar.bz2
trackermap-server-8eecfdcf5c59f92158a6c339d1622e0e9d67968c.zip
Pass user to notificators
Diffstat (limited to 'src/main/java/org/traccar/database/MailManager.java')
-rw-r--r--src/main/java/org/traccar/database/MailManager.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/org/traccar/database/MailManager.java b/src/main/java/org/traccar/database/MailManager.java
index d94f55cda..21fee5ee7 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 - 2021 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 - 2022 Anton Tananaev (anton@traccar.org)
* Copyright 2017 - 2018 Andrey Kunitsyn (andrey@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -92,14 +92,12 @@ public final class MailManager {
}
public void sendMessage(
- long userId, String subject, String body) throws MessagingException {
- sendMessage(userId, subject, body, null);
+ User user, String subject, String body) throws MessagingException {
+ sendMessage(user, subject, body, null);
}
public void sendMessage(
- long userId, String subject, String body, MimeBodyPart attachment) throws MessagingException {
- User user = Context.getPermissionsManager().getUser(userId);
-
+ User user, String subject, String body, MimeBodyPart attachment) throws MessagingException {
Properties properties = null;
if (!Context.getConfig().getBoolean("mail.smtp.ignoreUserConfig")) {
properties = getProperties(new PropertiesProvider(user));