aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/routes.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/routes.go')
-rw-r--r--plugins/base/routes.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/plugins/base/routes.go b/plugins/base/routes.go
index 7a8b845..61d92a6 100644
--- a/plugins/base/routes.go
+++ b/plugins/base/routes.go
@@ -691,10 +691,13 @@ func handleComposeNew(ctx *alps.Context) error {
// These are common mailto URL query parameters
// TODO: cc, bcc
+ var hdr mail.Header
+ hdr.GenerateMessageID()
+ mid, _ := hdr.MessageID()
return handleCompose(ctx, &OutgoingMessage{
To: strings.Split(ctx.QueryParam("to"), ","),
Subject: ctx.QueryParam("subject"),
- MessageID: mail.GenerateMessageID(),
+ MessageID: "<" + mid + ">",
InReplyTo: ctx.QueryParam("in-reply-to"),
Text: text,
}, &composeOptions{})
@@ -803,7 +806,10 @@ func handleReply(ctx *alps.Context) error {
return echo.NewHTTPError(http.StatusBadRequest, err)
}
- msg.MessageID = mail.GenerateMessageID()
+ var hdr mail.Header
+ hdr.GenerateMessageID()
+ mid, _ := hdr.MessageID()
+ msg.MessageID = "<" + mid + ">"
msg.InReplyTo = inReplyTo.Envelope.MessageId
// TODO: populate From from known user addresses and inReplyTo.Envelope.To
replyTo := inReplyTo.Envelope.ReplyTo
@@ -867,7 +873,10 @@ func handleForward(ctx *alps.Context) error {
return echo.NewHTTPError(http.StatusBadRequest, err)
}
- msg.MessageID = mail.GenerateMessageID()
+ var hdr mail.Header
+ hdr.GenerateMessageID()
+ mid, _ := hdr.MessageID()
+ msg.MessageID = "<" + mid + ">"
msg.Subject = source.Envelope.Subject
if !strings.HasPrefix(strings.ToLower(msg.Subject), "fwd:") &&
!strings.HasPrefix(strings.ToLower(msg.Subject), "fw:") {