While the man-page does document using "~|" when editing a message to pipe it through a command, mail(1) also supports the "pipe" command (also known as "|") as registered in "cmdtab.c" line 63-64 and it works fine, but the man-page lacks documentation for this command (which I would expect to see between the help for "next" and "Preserve").
-tkc PS: still hoping my small patch to add In-Reply-To support to mail(1) could make it in at some point: https://marc.info/?l=openbsd-tech&m=173749183921237&w=2 --