Commit | Line | Data |
---|---|---|
edeb626e AC |
1 | structure Mail :> MAIL = |
2 | struct | |
3 | ||
a1061bb4 | 4 | fun writeToLog s = () |
ba5de264 | 5 | (*let |
b675b4c5 | 6 | val outf = TextIO.openAppend (Init.scratchDir ^ "/log/mail.log") |
b564aa2b AC |
7 | in |
8 | TextIO.output (outf, s); | |
9 | TextIO.closeOut outf | |
ba5de264 | 10 | end*) |
b564aa2b | 11 | |
edeb626e AC |
12 | type session = (TextIO.instream, TextIO.outstream) Unix.proc |
13 | ||
14 | fun mopen () = Unix.execute ("/usr/sbin/exim4", ["-t"]) | |
b564aa2b | 15 | before writeToLog "\nNEW MESSAGE\n" |
edeb626e | 16 | |
b564aa2b AC |
17 | fun mwrite (ses, s) = (TextIO.output (Unix.textOutstreamOf ses, s); |
18 | writeToLog s) | |
edeb626e AC |
19 | |
20 | fun mclose ses = Unix.reap ses | |
21 | ||
bb40c5c6 AC |
22 | (*type session = unit |
23 | ||
24 | fun mopen () = () | |
25 | ||
26 | fun mwrite ((), s) = print s | |
27 | ||
28 | fun mclose () = OS.Process.success*) | |
29 | ||
b564aa2b | 30 | end |