payment: note that Stripe has instituted an additional 1% fee for non-US cards
[hcoop/portal.git] / mail.sml
... / ...
CommitLineData
1structure Mail :> MAIL =
2struct
3
4fun writeToLog s = ()
5 (*let
6 val outf = TextIO.openAppend (Init.scratchDir ^ "/log/mail.log")
7 in
8 TextIO.output (outf, s);
9 TextIO.closeOut outf
10 end*)
11
12type session = (TextIO.instream, TextIO.outstream) Unix.proc
13
14fun mopen () = Unix.execute ("/usr/sbin/sendmail", ["-t"])
15 before writeToLog "\nNEW MESSAGE\n"
16
17fun mwrite (ses, s) = (TextIO.output (Unix.textOutstreamOf ses, s);
18 writeToLog s)
19
20fun mclose ses = Unix.reap ses
21
22(*type session = unit
23
24fun mopen () = ()
25
26fun mwrite ((), s) = print s
27
28fun mclose () = OS.Process.success*)
29
30end