(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: mail_import.ml,v 1.8 2005/11/17 10:14:42 rich Exp $
+ * $Id: mail_import.ml,v 1.9 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
with
Not_found ->
error ~back_button:true ~title:"No message"
- q "No message was uploaded.";
+ dbh hostid q "No message was uploaded.";
return () in
(* Parse the message. *)
*)
if date = "" || inet_message_id = "" then (
error ~back_button:true ~title:"Headers missing"
- q "Date or Message-ID header missing. Cannot handle this message. ";
+ dbh hostid q
+ "Date or Message-ID header missing. Cannot handle this message. ";
return ()
);
let id = sth#fetch1int () in
if not overwrite then (
ok ~title:"Message exists"
- q "Message already imported";
+ dbh hostid q "Message already imported";
return ()
);
Some id
(* Finish off. *)
ok ~title:"Imported"
- q ("Message " ^ inet_message_id ^ " was imported.")
+ dbh hostid q ("Message " ^ inet_message_id ^ " was imported.")
let () =
register_script ~restrict:[CanImportMail] run