Commit aa4305a9 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Fix call to sendmail

 * it is not in the default $PATH, so use full path
 * set the address of the envelope sender
parent 3b0b659f
......@@ -246,4 +246,5 @@ let send_email from to_ subject body =
let contents =
"From: " ^ from ^ "\nTo: " ^ to_ ^ "\nSubject: " ^ subject ^ "\n\n" ^ body
Lwt_process.pwrite ("sendmail", [|"sendmail"; to_|]) contents
let sendmail = "/usr/sbin/sendmail" in
Lwt_process.pwrite (sendmail, [|sendmail; "-f"; from; to_|]) contents
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment