aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/mail/SmtpMailManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/mail/SmtpMailManager.java')
-rw-r--r--src/main/java/org/traccar/mail/SmtpMailManager.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/mail/SmtpMailManager.java b/src/main/java/org/traccar/mail/SmtpMailManager.java
index 4a0b7048f..8d1afbd3e 100644
--- a/src/main/java/org/traccar/mail/SmtpMailManager.java
+++ b/src/main/java/org/traccar/mail/SmtpMailManager.java
@@ -93,19 +93,21 @@ public final class SmtpMailManager implements MailManager {
return config.hasKey(Keys.MAIL_SMTP_HOST);
}
+ @Override
public void sendMessage(
- User user, String subject, String body) throws MessagingException {
- sendMessage(user, subject, body, null);
+ User user, boolean system, String subject, String body) throws MessagingException {
+ sendMessage(user, system, subject, body, null);
}
+ @Override
public void sendMessage(
- User user, String subject, String body, MimeBodyPart attachment) throws MessagingException {
+ User user, boolean system, String subject, String body, MimeBodyPart attachment) throws MessagingException {
Properties properties = null;
if (!config.getBoolean(Keys.MAIL_SMTP_IGNORE_USER_CONFIG)) {
properties = getProperties(new PropertiesProvider(user));
}
- if (properties == null) {
+ if (properties == null && (system || !config.getBoolean(Keys.MAIL_SMTP_SYSTEM_ONLY))) {
properties = getProperties(new PropertiesProvider(config));
}
if (properties == null) {