from and envelope_from_address

Kevin J. McCarthy kevin at 8t8.us
Mon Feb 13 17:39:20 UTC 2023


On Sun, Feb 12, 2023 at 05:14:38PM -0800, Ian Zimmerman wrote:
>lists -group mutt mutt-users
>send-hook '%L mutt' "set from='googly.negotiator862 at aceecat.org' ; set envelope_from_address='googly.negotiator862 at aceecat.org'"

You can assign envelope_from_address=$from.  However, make sure you use 
a single quote on the send-hook command, to delay expansion of $from 
until the hook is executed:

send-hook '%L mutt' 'set from="googly.negotiator862 at aceecat.org" envelope_from_address=$from'

If you cover all cases with the send-hook, you could also put the final
assignment in its own send-hook:

send-hook '~A'      'set from="default at example.com"'
send-hook '%L mutt' 'set from="googly.negotiator862 at aceecat.org"'
[...]
send-hook '~A'      'set envelope_from_address=$from'

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20230213/9cc98aea/attachment.asc>


More information about the Mutt-users mailing list