aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-11-13 10:32:02 -0500
committerDrew DeVault <sir@cmpwn.com>2020-11-13 10:33:16 -0500
commit0d1cca191bd054516fa70d5715996ea085a0dde6 (patch)
tree53c6e028bda24b03aecaf0a5c50f9bb98cfe965a
parent5268eba101e1919e2ced0385c51c58b14b8ed668 (diff)
downloadalps-0d1cca191bd054516fa70d5715996ea085a0dde6.tar.gz
alps-0d1cca191bd054516fa70d5715996ea085a0dde6.zip
alps/compose.html: fix message ID
-rw-r--r--plugins/base/smtp.go3
-rw-r--r--themes/alps/compose.html4
2 files changed, 5 insertions, 2 deletions
diff --git a/plugins/base/smtp.go b/plugins/base/smtp.go
index 50a2fd0..40967dc 100644
--- a/plugins/base/smtp.go
+++ b/plugins/base/smtp.go
@@ -172,6 +172,9 @@ func (msg *OutgoingMessage) WriteTo(w io.Writer) error {
}
h.Set("Message-Id", msg.MessageID)
+ if msg.MessageID == "" {
+ panic(fmt.Errorf("Attempting to send message without message ID"))
+ }
mw, err := mail.CreateWriter(w, h)
if err != nil {
diff --git a/themes/alps/compose.html b/themes/alps/compose.html
index f4b7b9a..a8b6815 100644
--- a/themes/alps/compose.html
+++ b/themes/alps/compose.html
@@ -9,8 +9,8 @@
<main class="create-update">
<form method="post" enctype="multipart/form-data">
- <input type="hidden" name="message_id" value="{{.Message.InReplyTo}}">
- <input type="hidden" name="in_reply_to" value="{{.Message.MessageID}}">
+ <input type="hidden" name="message_id" value="{{.Message.MessageID}}">
+ <input type="hidden" name="in_reply_to" value="{{.Message.InReplyTo}}">
<div class="headers no-js">
<label>From</label>