(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: mailing_list_send.ml,v 1.4 2004/10/04 15:19:56 rich Exp $
+ * $Id: mailing_list_send.ml,v 1.6 2005/11/24 14:54:12 rich Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
if email = "" then (
error ~title:"No email address" ~back_button:true
- q "You must give an email address.";
+ dbh hostid q "You must give an email address.";
return ()
);
if registered then (
error ~title:"Email address already used" ~back_button:true
- q
+ dbh hostid q
("That email address is already on our mailing list. "^
"If you are not receiving mailing list messages, then you will " ^
"need to confirm that address. If you continue to have problems " ^
let body = template#to_string in
let subject = "Site notice: " ^ hostname ^ ": Confirm your email address" in
- Sendmail.send_mail ~subject ~body ~to_addr:[email] ();
+ Sendmail.send_mail ~subject ~to_addr:[email] body;
(* Finish up. *)
let buttons = [ ok_button "/" ] in
ok ~buttons ~title:"Confirmation email sent"
- q ("Please check your email now. You have been sent a confirmation " ^
- "email so we can verify the email address is yours. Click on the " ^
- "first link in that email to confirm.")
+ dbh hostid q
+ ("Please check your email now. You have been sent a confirmation " ^
+ "email so we can verify the email address is yours. Click on the " ^
+ "first link in that email to confirm.")
let () =
register_script ~restrict:[CanView] run