X-Git-Url: https://git.hcoop.net/hcoop/portal.git/blobdiff_plain/b564aa2b758eff0052452e69c91e83e8676664cf..4039d8283ff74cbf5bff3cc8616d293f13180135:/mail.sml diff --git a/mail.sml b/mail.sml index a06f36c..d847a57 100644 --- a/mail.sml +++ b/mail.sml @@ -1,17 +1,17 @@ structure Mail :> MAIL = struct -fun writeToLog s = - let - val outf = TextIO.openAppend "/home/hcoop/mail.log" +fun writeToLog s = () + (*let + val outf = TextIO.openAppend (Init.scratchDir ^ "/log/mail.log") in TextIO.output (outf, s); TextIO.closeOut outf - end + end*) type session = (TextIO.instream, TextIO.outstream) Unix.proc -fun mopen () = Unix.execute ("/usr/sbin/exim4", ["-t"]) +fun mopen () = Unix.execute ("/usr/sbin/sendmail", ["-t"]) before writeToLog "\nNEW MESSAGE\n" fun mwrite (ses, s) = (TextIO.output (Unix.textOutstreamOf ses, s); @@ -19,4 +19,12 @@ fun mwrite (ses, s) = (TextIO.output (Unix.textOutstreamOf ses, s); fun mclose ses = Unix.reap ses +(*type session = unit + +fun mopen () = () + +fun mwrite ((), s) = print s + +fun mclose () = OS.Process.success*) + end