To set MAIL editor to a foreign editor use:

  MAIL> SET EDITOR name

  which will activate image SYS$SHARE:name.EXE entrypoint
  name$EDIT (IN DESCR STRING INFILE,IN DESCR STRING OUTFILE).

or:

  $ DEFINE MAIL$EDIT CALLABLE_name

  which will do the same thing.

or:

  $ DEFINE MAIL$EDIT disk:[dir]name.COM

  which will activate disk:[dir]name.COM with P1=infile and P2=outfile.

  Skeleton file:

    $ IF P1 .NES. "" THEN COPY 'P1' 'P2'
    $ DEFINE/NOLOG SYS$INPUT SYS$COMMAND
    $ name 'P2'
    $ EXIT