diff options
Diffstat (limited to 'src/org/traccar/notification/NotificationMail.java')
-rw-r--r-- | src/org/traccar/notification/NotificationMail.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/org/traccar/notification/NotificationMail.java b/src/org/traccar/notification/NotificationMail.java index 90f6bd75e..dc68b82e9 100644 --- a/src/org/traccar/notification/NotificationMail.java +++ b/src/org/traccar/notification/NotificationMail.java @@ -29,6 +29,7 @@ import org.traccar.helper.Log; import org.traccar.model.Event; import org.traccar.model.Position; import org.traccar.model.User; +import org.traccar.notification.NotificationFormatter.MailMessage; public final class NotificationMail { @@ -106,8 +107,9 @@ public final class NotificationMail { } message.addRecipient(Message.RecipientType.TO, new InternetAddress(user.getEmail())); - message.setSubject(NotificationFormatter.formatTitle(userId, event, position)); - message.setText(NotificationFormatter.formatMessage(userId, event, position)); + MailMessage mailMessage = NotificationFormatter.formatMessage(userId, event, position); + message.setSubject(mailMessage.getSubject()); + message.setContent(mailMessage.getBody(), "text/html; charset=utf-8"); Transport transport = session.getTransport(); try { |