* Ken Weingold <[EMAIL PROTECTED]> [2002-06-06 16:40]: > Well here's a feature request. I wish there were an option to have > mutt prompt you for which return address to use, being able to pick > from a menu of addresses set somewhere in the muttrc. Any > possibility?
A few months ago, some (sorry, I don't remember who) posted a patch that adds an "ask-from" quadoption, which does what you're asking for in not too many lines. It's written against 1.3.27, and I've applied it to 1.3.28 (haven't tried 1.4 yet). It's attached. (darren) -- Students achieving Oneness will move on to Twoness. -- Woody Allen
diff -rup mutt-1.3.27.orig/init.h mutt-1.3.27/init.h --- mutt-1.3.27.orig/init.h Mon Dec 10 02:09:03 2001 +++ mutt-1.3.27/init.h Tue Feb 12 12:28:01 2002 @@ -181,6 +181,12 @@ struct option_t MuttVars[] = { ** If set, Mutt will use plain ASCII characters when displaying thread ** and attachment trees, instead of the default \fIACS\fP characters. */ + { "askfrom", DT_BOOL, R_NONE, OPTASKFROM, 0 }, + /* + ** .pp + ** If set, Mutt will prompt you for a From: address + ** before editing an outgoing message. + */ { "askbcc", DT_BOOL, R_NONE, OPTASKBCC, 0 }, /* ** .pp diff -rup mutt-1.3.27.orig/mutt.h mutt-1.3.27/mutt.h --- mutt-1.3.27.orig/mutt.h Tue Jan 15 13:00:32 2002 +++ mutt-1.3.27/mutt.h Tue Feb 12 12:30:20 2002 @@ -307,6 +307,7 @@ enum OPTALLOWANSI, OPTARROWCURSOR, OPTASCIICHARS, + OPTASKFROM, OPTASKBCC, OPTASKCC, OPTATTACHSPLIT, diff -rup mutt-1.3.27.orig/send.c mutt-1.3.27/send.c --- mutt-1.3.27.orig/send.c Fri Dec 28 09:14:36 2001 +++ mutt-1.3.27/send.c Tue Feb 12 12:23:27 2002 @@ -201,6 +201,8 @@ static int edit_envelope (ENVELOPE *en) char buf[HUGE_STRING]; LIST *uh = UserHeader; + if (option (OPTASKFROM) && edit_address (&en->from, "From: ") == -1 || en->from == +NULL) + return (-1); if (edit_address (&en->to, "To: ") == -1 || en->to == NULL) return (-1); if (option (OPTASKCC) && edit_address (&en->cc, "Cc: ") == -1)