diff options
author | Renaud Allard <renaud@allard.it> | 2017-04-20 15:20:46 +0200 |
---|---|---|
committer | Renaud Allard <renaud@allard.it> | 2017-04-20 15:20:46 +0200 |
commit | faa31b223ade91569cd1c3b888f74060f93c55ae (patch) | |
tree | 78903c572c6f6e2b328cbfbfde31b85903b5dd0f /src/org/traccar/notification | |
parent | ce1a5a24bbf0a74335cab0799c2d0acdcdde761c (diff) | |
download | traccar-server-faa31b223ade91569cd1c3b888f74060f93c55ae.tar.gz traccar-server-faa31b223ade91569cd1c3b888f74060f93c55ae.tar.bz2 traccar-server-faa31b223ade91569cd1c3b888f74060f93c55ae.zip |
Add a Date: header in notification emails
Diffstat (limited to 'src/org/traccar/notification')
-rw-r--r-- | src/org/traccar/notification/NotificationMail.java | 2 |
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(); |