diff options
author | hrdl <git@hrdl.eu> | 2024-09-13 16:14:32 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-10-12 00:35:20 +0200 |
commit | d58065acd41ecce5ac5377a1341560dde87c5fe5 (patch) | |
tree | f6c336b03f012acbc88e460e8fd7b0f8164f6399 /commands/compose | |
parent | 6ea2b786d4eb715e580f73e210a322aac10adc9f (diff) | |
download | aerc-d58065acd41ecce5ac5377a1341560dde87c5fe5.tar.gz |
Add a new boolean option in accounts.conf to use the envelope From
address instead of the *from* configuration option when submitting via
smtp, jmap or sendmail.
Changelog-added: New `use-envelope-from` option in `accounts.conf`.
Signed-off-by: hrdl <git@hrdl.eu>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands/compose')
-rw-r--r-- | commands/compose/send.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/commands/compose/send.go b/commands/compose/send.go index 73672fed..aefeaa3c 100644 --- a/commands/compose/send.go +++ b/commands/compose/send.go @@ -110,6 +110,11 @@ func (s Send) Execute(args []string) error { domain = domain_ } from := config.From + if config.UseEnvelopeFrom { + if fl, _ := header.AddressList("from"); len(fl) != 0 { + from = fl[0] + } + } log.Debugf("send config uri: %s", uri.Redacted()) log.Debugf("send config from: %s", from) |