aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorRenaud Allard <renaud@allard.it>2017-04-20 15:20:46 +0200
committerRenaud Allard <renaud@allard.it>2017-04-20 15:20:46 +0200
commitfaa31b223ade91569cd1c3b888f74060f93c55ae (patch)
tree78903c572c6f6e2b328cbfbfde31b85903b5dd0f /src/org/traccar
parentce1a5a24bbf0a74335cab0799c2d0acdcdde761c (diff)
downloadtrackermap-server-faa31b223ade91569cd1c3b888f74060f93c55ae.tar.gz
trackermap-server-faa31b223ade91569cd1c3b888f74060f93c55ae.tar.bz2
trackermap-server-faa31b223ade91569cd1c3b888f74060f93c55ae.zip
Add a Date: header in notification emails
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/notification/NotificationMail.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/org/traccar/notification/NotificationMail.java b/src/org/traccar/notification/NotificationMail.java
index 41cb2e681..c31a02b32 100644
--- a/src/org/traccar/notification/NotificationMail.java
+++ b/src/org/traccar/notification/NotificationMail.java
@@ -24,6 +24,7 @@ import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
+import java.util.Date;
import org.traccar.Context;
import org.traccar.helper.Log;
@@ -109,6 +110,7 @@ public final class NotificationMail {
message.addRecipient(Message.RecipientType.TO, new InternetAddress(user.getEmail()));
MailMessage mailMessage = NotificationFormatter.formatMailMessage(userId, event, position);
message.setSubject(mailMessage.getSubject());
+ message.setSentDate(new Date());
message.setContent(mailMessage.getBody(), "text/html; charset=utf-8");
Transport transport = session.getTransport();