aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrivathsan Murali <sri@vathsan.com>2019-11-15 11:00:44 +0100
committerDrew DeVault <sir@cmpwn.com>2019-11-17 13:24:23 -0500
commit59c24523af859dfbd2d5d33f46ab8d5c5a347f8f (patch)
tree4a1e0775c4769dd8d8d8cca16f7f44d0a990a82c
parent3338dce8a16a860f455186ef9819e661a63577e2 (diff)
downloadaerc-59c24523af859dfbd2d5d33f46ab8d5c5a347f8f.tar.gz
Parse Reply-To header while parsing envelope
-rw-r--r--worker/lib/parse.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/worker/lib/parse.go b/worker/lib/parse.go
index df9683aa..c3a43ca5 100644
--- a/worker/lib/parse.go
+++ b/worker/lib/parse.go
@@ -150,6 +150,10 @@ func parseEnvelope(h *mail.Header) (*models.Envelope, error) {
if err != nil {
return nil, fmt.Errorf("could not read bcc address: %v", err)
}
+ replyTo, err := parseAddressList(h, "reply-to")
+ if err != nil {
+ return nil, fmt.Errorf("could not read reply-to address: %v", err)
+ }
subj, err := h.Subject()
if err != nil {
return nil, fmt.Errorf("could not read subject: %v", err)
@@ -163,6 +167,7 @@ func parseEnvelope(h *mail.Header) (*models.Envelope, error) {
Subject: subj,
MessageId: msgID,
From: from,
+ ReplyTo: replyTo,
To: to,
Cc: cc,
Bcc: bcc,