#!/usr/bin/txr @(next :args) @(cases) @TO @SUBJ @ (maybe) @CC @ (or) @ (bind CC "") @ (end) @(or) @ (throw error "must specify at least To and Subject") @(end) @(next *stdin*) @(collect) @BODY @(end) @(output (open-command `mail -s "@SUBJ" -a CC: "@CC" "@TO"` "w")) @(repeat) @BODY @(end) . @(end)