1 structure Mail
:> MAIL
=
6 val outf
= TextIO.openAppend (Init
.scratchDir ^
"/log/mail.log")
8 TextIO.output (outf
, s
);
12 type session
= (TextIO.instream
, TextIO.outstream
) Unix
.proc
14 fun mopen () = Unix
.execute ("/usr/sbin/exim4", ["-t"])
15 before writeToLog
"\nNEW MESSAGE\n"
17 fun mwrite (ses
, s
) = (TextIO.output (Unix
.textOutstreamOf ses
, s
);
20 fun mclose ses
= Unix
.reap ses
26 fun mwrite ((), s
) = print s
28 fun mclose () = OS
.Process
.success
*)