aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/notification
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/notification')
-rw-r--r--src/org/traccar/notification/NotificationMail.java1
-rw-r--r--src/org/traccar/notification/NotificationSms.java2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/org/traccar/notification/NotificationMail.java b/src/org/traccar/notification/NotificationMail.java
index c31a02b32..115b109e6 100644
--- a/src/org/traccar/notification/NotificationMail.java
+++ b/src/org/traccar/notification/NotificationMail.java
@@ -115,6 +115,7 @@ public final class NotificationMail {
Transport transport = session.getTransport();
try {
+ Context.getStatisticsManager().registerMail();
transport.connect(
properties.getProperty("mail.smtp.host"),
properties.getProperty("mail.smtp.username"),
diff --git a/src/org/traccar/notification/NotificationSms.java b/src/org/traccar/notification/NotificationSms.java
index 7b265e3ce..8c0265af4 100644
--- a/src/org/traccar/notification/NotificationSms.java
+++ b/src/org/traccar/notification/NotificationSms.java
@@ -34,6 +34,7 @@ public final class NotificationSms {
public static void sendSmsAsync(long userId, Event event, Position position) {
User user = Context.getPermissionsManager().getUser(userId);
if (Context.getSmppManager() != null && user.getPhone() != null) {
+ Context.getStatisticsManager().registerSms();
Context.getSmppManager().sendMessageAsync(user.getPhone(),
NotificationFormatter.formatSmsMessage(userId, event, position), false);
}
@@ -43,6 +44,7 @@ public final class NotificationSms {
UnrecoverablePduException, SmppTimeoutException, SmppChannelException, InterruptedException {
User user = Context.getPermissionsManager().getUser(userId);
if (Context.getSmppManager() != null && user.getPhone() != null) {
+ Context.getStatisticsManager().registerSms();
Context.getSmppManager().sendMessageSync(user.getPhone(),
NotificationFormatter.formatSmsMessage(userId, event, position), false);
}