$! EVE_MAIL.COM - Send mail using EVE and archive outgoing mail $! $! Author: Peter Johansson (peter@cs.umbc.edu) $! $! This file is intended for informational purposes only - Execute it at $! your own risk. All code Copyright (C) 1993 by Peter Johansson. $! $! Non-commercial use unrestricted so long as all attributions remain $! intact. That is, if you use any part or parts of this code, I want $! credit for my work. $! $! --- begin origonal file --- $! $! EVE_MAIL.COM $! By: Peter Johansson $! Last update: June 5, 1989 $! $! Modified from a 3-line program to merely invoke EVE (from Jack Suess) $! Enhanced various times to allow eve/recover to work properly $! (recovery is now done automatically) $! Enhanced to save outgoing outgoing mail $! Previous mods made prior to Sept 3, 1988 $! Enhanced to save all mail in one big file with date (Sept 3, 1988) $! June 5, 1989 - VMS 5.0 fixed some bugs in the EVE recover mechanism $! but my program already handeled them. The excess code to cover $! for the bugs has been removed. $! $! Command procedure to invoke an editor for MAIL. $! $! Inputs: $! $! P1 = Input file name. $! P2 = Output file name. $! $! If MAIL$EDIT is undefined, MAIL will invoke callable EDT. $! If MAIL$EDITis defined to be a command procedure, $! MAIL will create a subprocess to edit the mail. $! $! Note that this procedure is run in the context of a subprocess. $! LOGIN.COM is not executed. However, all process logical names $! and DCL global symbols are copied. $! $! The default directory is the same as the parent process $! $ set noon $ on warning then goto bye $ on control_y then goto bye $ set default sys$login $ if f$search("$mail.dir") .nes. "" then set default [.$mail] $ if f$search("mail.tjl") .eqs. "" then goto no_tjl_files $ inquire/nopunc yn "A journaled mail file exists. Recover it? (y/n) " $ if .not. yn then goto no_tjl_files $! rename mail.tjl tpu.tjl !!! this line no longer needed $ define/user/nolog sys$input sys$command $ edit/tpu/recover mail.wrk $ goto bye $ no_tjl_files: $ define/user/nolog sys$input sys$command $ if p1 .eqs. "" then goto noinput $ edit/tpu/journal=mail.tjl/output=mail.wrk 'p1' $ goto bye $ noinput: $ edit/tpu/journal=mail.tjl mail.wrk $ bye: $ on warning then goto bye2 $ if f$search("mail.save") .eqs. "" then create mail.save $ open/append/error=bye2 mail_save mail.save $ write mail_save "" $ write mail_save "--------------------------------------------------------" $ write mail_save f$time() $ write mail_save "" $ close mail_save $ bye2: $ on warning then exit $ append mail.wrk mail.save $ rename mail.wrk 'p2' $ exit