diff options
author | Kevin McCarthy <kevin@8t8.us> | 2024-03-09 18:01:11 +0800 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2024-03-09 18:01:11 +0800 |
commit | 9b967f07ab58c981f9f43702921393633bd832ff (patch) | |
tree | a36263dd2454dfbac1a48009da0b985cc16051e3 | |
parent | 039cc5211bce1206ab914d64b35ee42d4dc1e8d6 (diff) |
Fix smtp client to respect $use_envelope_from option.
The code was only looking to see if $envelope_from_address had a
value, not if $use_envelope_from was set.
Add extra safety checks to make sure the mailbox value isn't NULL.
-rw-r--r-- | smtp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -343,9 +343,9 @@ mutt_smtp_send (const ADDRESS* from, const ADDRESS* to, const ADDRESS* cc, /* it might be better to synthesize an envelope from from user and host * but this condition is most likely arrived at accidentally */ - if (EnvFrom) + if (option (OPTENVFROM) && EnvFrom && EnvFrom->mailbox) envfrom = EnvFrom->mailbox; - else if (from) + else if (from && from->mailbox) envfrom = from->mailbox; else { |