cvsimport
[hcoop/zz_old/portal.git] / mail.sml
CommitLineData
2eae496b 1structure Mail :> MAIL =
2struct
3
263372a6 4fun writeToLog s = ()
acf5dabe 5 (*let
4501624f 6 val outf = TextIO.openAppend (Init.scratchDir ^ "/log/mail.log")
72c58505 7 in
8 TextIO.output (outf, s);
9 TextIO.closeOut outf
acf5dabe 10 end*)
72c58505 11
2eae496b 12type session = (TextIO.instream, TextIO.outstream) Unix.proc
13
14fun mopen () = Unix.execute ("/usr/sbin/exim4", ["-t"])
72c58505 15 before writeToLog "\nNEW MESSAGE\n"
2eae496b 16
72c58505 17fun mwrite (ses, s) = (TextIO.output (Unix.textOutstreamOf ses, s);
18 writeToLog s)
2eae496b 19
20fun mclose ses = Unix.reap ses
21
72c58505 22end