aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-12-03 18:54:04 +0100
committerSimon Ser <contact@emersion.fr>2019-12-03 18:54:04 +0100
commit6344806755202babab99564bee362d9e5e238185 (patch)
tree253f14faf6415c109eee287533e789c890c81108
parente90d4579ae107f89e20669781e4bf4834e6e6b9a (diff)
downloadalps-6344806755202babab99564bee362d9e5e238185.tar.gz
alps-6344806755202babab99564bee362d9e5e238185.zip
Fix missing OutgoingMessage.InReplyTo assignment
-rw-r--r--server.go14
1 files changed, 5 insertions, 9 deletions
diff --git a/server.go b/server.go
index 8e3730c..bcdcfcc 100644
--- a/server.go
+++ b/server.go
@@ -271,10 +271,11 @@ func handleCompose(ectx echo.Context) error {
}
if ctx.Request().Method == http.MethodPost {
- from := ctx.FormValue("from")
- to := parseAddressList(ctx.FormValue("to"))
- subject := ctx.FormValue("subject")
- text := ctx.FormValue("text")
+ msg.From = ctx.FormValue("from")
+ msg.To = parseAddressList(ctx.FormValue("to"))
+ msg.Subject = ctx.FormValue("subject")
+ msg.Text = ctx.FormValue("text")
+ msg.InReplyTo = ctx.FormValue("in_reply_to")
c, err := ctx.server.connectSMTP()
if err != nil {
@@ -287,11 +288,6 @@ func handleCompose(ectx echo.Context) error {
return echo.NewHTTPError(http.StatusForbidden, err)
}
- msg.From = from
- msg.To = to
- msg.Subject = subject
- msg.Text = text
-
if err := sendMessage(c, &msg); err != nil {
return err
}