aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-12-25 14:51:59 +0300
committerGravatar Vitaly Takmazov2017-12-25 14:51:59 +0300
commit922296c9cf68fbbbd183d161eb3729e53eb100b7 (patch)
tree17532a70240d297fbb2e0cf68525935fdd6885a6 /juick-api/src/main/java/com/juick
parent4e127d6c4c04c009ef542d25804bc927f6e57d5e (diff)
email: proper message-id generation
Diffstat (limited to 'juick-api/src/main/java/com/juick')
-rw-r--r--juick-api/src/main/java/com/juick/api/EmailManager.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/juick-api/src/main/java/com/juick/api/EmailManager.java b/juick-api/src/main/java/com/juick/api/EmailManager.java
index 52315ff6..64f06aee 100644
--- a/juick-api/src/main/java/com/juick/api/EmailManager.java
+++ b/juick-api/src/main/java/com/juick/api/EmailManager.java
@@ -58,14 +58,14 @@ public class EmailManager implements ApplicationListener<MessageEvent> {
Transport transport = session.getTransport("smtp");
MimeMessage message = new MimeMessage(session) {
protected void updateMessageID() throws MessagingException {
- setHeader("Message-ID", formatUrl(msg));
+ setHeader("Message-ID", String.format("%d.%d@juick.com", msg.getMid(), msg.getRid()));
if (msg.getRid() > 0) {
if (msg.getReplyto() > 0) {
Message replyto = messagesService.getReply(msg.getMid(), msg.getReplyto());
- setHeader("In-Reply-To", formatUrl(replyto));
+ setHeader("In-Reply-To", String.format("%d.%d@juick.com", replyto.getMid(), replyto.getRid()));
} else {
Message original = messagesService.getMessage(msg.getMid());
- setHeader("In-Reply-To", formatUrl(original));
+ setHeader("In-Reply-To", String.format("%d.%d@juick.com", original.getMid(), original.getRid()));
}
}
}