From faa31b223ade91569cd1c3b888f74060f93c55ae Mon Sep 17 00:00:00 2001 From: Renaud Allard Date: Thu, 20 Apr 2017 15:20:46 +0200 Subject: Add a Date: header in notification emails --- src/org/traccar/notification/NotificationMail.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/org/traccar/notification') 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(); -- cgit v1.2.3