Update Checkout fee information
[hcoop/portal.git] / vmailpasswd / pass.sml
CommitLineData
393a4193
AC
1structure Pass :> PASS =
2struct
3
4fun validEmail email =
5 case String.fields (fn ch => ch = #"@") email of
6 [_, dom] => dom <> "localhost"
7 | _ => false
8
393a4193
AC
9fun change (email, old, new) =
10 let
abcc3395 11 val cmd = String.concat ["/usr/bin/sudo /usr/local/bin/vmailpasswd \"",
393a4193
AC
12 String.toString email,
13 "\" \"",
14 String.toString old,
15 "\" \"",
16 String.toString new,
9a4c122a 17 "\" >/dev/null 2>/dev/null"]
393a4193
AC
18 in
19 OS.Process.isSuccess (OS.Process.system cmd)
20 end
21
22end