join: use generic sendmail instead of exim4
[hcoop/portal.git] / app / app.sml
index 28d88dd..12abe57 100644 (file)
@@ -46,9 +46,9 @@ fun readFile fname =
        before TextIO.closeIn inf
     end
 
-fun readTosBody () = readFile "/home/hcoop/public_html/tos.body.html"
-fun readTosAgree () = readFile "/home/hcoop/public_html/tos.agree.html"
-fun readTosMinorAgree () = readFile "/home/hcoop/public_html/tos.agree.minor.html"
+fun readTosBody () = readFile (Config.staticFilesRoot ^ "tos.body.html")
+fun readTosAgree () = readFile (Config.staticFilesRoot ^ "tos.agree.html")
+fun readTosMinorAgree () = readFile (Config.staticFilesRoot ^ "tos.agree.minor.html")
 
 fun sendMail (to, subj, intro, footer, id) =
     let
@@ -62,7 +62,7 @@ fun sendMail (to, subj, intro, footer, id) =
                 C.stringFromSql other)
              | _ => raise Fail "Bad sendMail row"
 
-       val proc = Unix.execute ("/usr/sbin/exim4", ["-t"])
+       val proc = Unix.execute ("/usr/sbin/sendmail", ["-t"])
        fun mwrite s = TextIO.output (Unix.textOutstreamOf proc, s)
     in
        mwrite ("From: Hcoop Application System <join@hcoop.net>\nTo: ");