aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorBence Ferdinandy <bence@ferdinandy.com>2024-06-29 21:47:38 +0200
committerRobin Jarry <robin@jarry.cc>2024-08-03 20:05:29 +0200
commit88d5de97d6c2caf37c693a51daf98f81951a37ac (patch)
tree28fce3a867713993f395ceaec57153102b7d6f35 /models
parent1d4eafb011f46966848d55f381160e846d0d50c8 (diff)
downloadaerc-88d5de97d6c2caf37c693a51daf98f81951a37ac.tar.gz
reply: handle the Sender header
Sometimes emails will have a Sender: header, that is different from the From: header. The only use of this in the wild I have seen to date is when meeting invitation is forwarded by somebody. The From: header will be the person organising the meeting, and the Sender: will be the person forwarding. Naturally, when one replies (e.g. with on accept), it should go to the meeting oragniser, but sometimes one would want to include the Sender in such a reply. When executing :reply determine the To: address in order of Reply-To:, From:, Sender:. When executing :reply -a, include the Sender: in Cc:. Implements: https://todo.sr.ht/~rjarry/aerc/259 Link: https://www.rfc-editor.org/rfc/rfc4021#section-2.1.3 Changelog-added: Replying to all will include the Sender in Cc. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Reviewed-by: Tim Culverhouse <tim@timculverhouse.com> Reviewed-by: Tristan Partin <tristan@partin.io> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'models')
-rw-r--r--models/models.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/models/models.go b/models/models.go
index 80bc0db1..7642579a 100644
--- a/models/models.go
+++ b/models/models.go
@@ -229,6 +229,7 @@ type Envelope struct {
Subject string
From []*mail.Address
ReplyTo []*mail.Address
+ Sender []*mail.Address
To []*mail.Address
Cc []*mail.Address
Bcc []*mail.Address