:wsstrip L( s+ Lw 1 $| so " " $?f ?? $+ Lb ?. sx s- L) L( s+ Lw _1 $| s+ " " $?f ?? $+ Lb ?. s- L) ; :outhdr @outstring @outstring "\n" @outstring ; i(outmimehdr) i(outdatehdr) 0 [[ Construct a To: header from all From: and Cc: contents, but if Reply-To: is given, use that instead. ]] "Reply-To" @hdrget t?s ?? sx s- ?| L( "From" @hdrget t?s Lw sx s- sx 1 + L) s- L( "Cc" @hdrget t?s Lw sx s- sx 1 + L) s- ", " $!+ ?. "To: " \outhdr [[ If $USER is set, generate a From: header from it. ]] "USER" eg t?s ?? "From: " \outhdr ?| s- ?. [[ Generate a Subject: from the existing message's Subject:; if none, don't generate any. ]] "Subject" @hdrget t?s ?? sx s- 3 $| so "re:" $?l ?? $+ ?| sx s- ?. \wsstrip "Re: " sx $+ "Subject: " \outhdr ?| s- ?. [[ Pick up Message-Id: and References: lines and generate In-Reply-To: and References: from them. ]] 0 L( "References" @hdrget t?s Lw sx s- sx 1 + L) s- "Message-Id" @hdrget t?s ?? sx s- sx 1 + so "In-Reply-To: " \outhdr ?| s- ?. s+ 0 > ?? "\n\t" $!+ "References: " \outhdr ?| s- ?. [[ End of headers. ]] "\n" @outstring @hdrreset { s- { "" @hdrget t?i ?? s- s- { @bodyline } "" ?| ": " sx $+ $+ ?. } @unixfrom t?i ?? s- s+ Cc ?. } L( s+ Cc t?s Lw "> " @outstring "\n" $*+ "\n> " $!+ @outstring "\n" @outstring L) s- s-