On Monday, 10 November 2008 at 21:17, Gary Johnson wrote: > I'm using the 1.5.17 source, which doesn't have 'envfrom', so I > don't know what that means for the problem I've been having. I did > use gdb more this evening and looked at the code in the > ci_send_message() function in send.c. The problem seems to be that > 'killfrom' is set to 1 near the top of the function with the > expectation that its value and the value of 'msg->env->from' will be > (re)set correctly after the send-hooks are executed. However, > send-hooks aren't executed in batch mode, so 'killfrom' is never > reset and hence 'msg->env->from' is deleted before the message is > sent. I made the following change which seems to fix the problem. > > > +++ send.c 2008-11-10 20:00:13.703739000 -0800 > @@ -1222,7 +1222,8 @@ > if (!msg->env->from && option (OPTUSEFROM) && !(flags & > (SENDPOSTPONED|SENDRESEND))) > { > msg->env->from = mutt_default_from (); > - killfrom = 1; /* $use_from will be re-checked after send-hooks */ > + if (!(flags & SENDBATCH)) > + killfrom = 1; /* $use_from will be re-checked after send-hooks */ > } > > if (flags & SENDBATCH) > > > I will admit that I don't completely understand the relationships > among 'killfrom', option(OPTUSEFROM) and msg->env->from, or all the > implications of the various flags, so I may have missed something, > but I'm going to try this "fix" for a while and see what happens. If you're going to the trouble of hacking on the source anyway, I'd suggest you use 1.5.18 or the latest from mercurial.
Attachment:
pgpY13MK8u2yW.pgp
Description: PGP signature