a -from when sending with mhmail.
.B \-from
.IR addr ,
you can specify the \*(lqFrom:\*(rq header of
-the draft. Naturally,
+the draft. If no
+.B \-from
+switch is used when sending,
+.B mhmail
+will supply a \*(lqFrom:\*(rq header field using the sender's local mailbox.
+Naturally,
.B post
will fill\-in the \*(lqSender:\*(rq
header correctly.
*/
#include <h/mh.h>
+#include <h/mts.h>
#include <h/signals.h>
#include <h/utils.h>
#include <signal.h>
fprintf (out, "%sSubject: %s\n", resent ? "Resent-" : "", subject);
if (from)
fprintf (out, "%sFrom: %s\n", resent ? "Resent-" : "", from);
+ else
+ fprintf (out, "From: %s\n", getlocalmbox ());
if (!resent)
fputs ("\n", out);