diff options
Diffstat (limited to 'src/org/traccar/notification/NotificationMail.java')
-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(); |