aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-04-22 09:28:58 +1200
committerGitHub <noreply@github.com>2017-04-22 09:28:58 +1200
commit72f12c56689bc5b90e4b2256027a88289e5f47fa (patch)
tree78903c572c6f6e2b328cbfbfde31b85903b5dd0f /src/org
parentce1a5a24bbf0a74335cab0799c2d0acdcdde761c (diff)
parentfaa31b223ade91569cd1c3b888f74060f93c55ae (diff)
downloadtrackermap-server-72f12c56689bc5b90e4b2256027a88289e5f47fa.tar.gz
trackermap-server-72f12c56689bc5b90e4b2256027a88289e5f47fa.tar.bz2
trackermap-server-72f12c56689bc5b90e4b2256027a88289e5f47fa.zip
Merge pull request #3104 from renaudallard/master
Add a Date: header in notification emails
Diffstat (limited to 'src/org')
-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();