- None -> false
- | Some email ->
- let subject =
- "Crash notify: There was a 500 internal server error" in
- let body = "Crash at " ^ time ^ "\n" ^
- "Hostname is " ^ canonical_hostname ^ "\n" ^
- "Please see the error log for details." in
- Sendmail.send_mail ~subject ~to_addr:[email] body;
+ | None -> false
+ | Some email ->
+ let subject =
+ "Crash notify: There was a 500 internal server error" in
+ let body = "Crash at " ^ time ^ "\n" ^
+ "Hostname is " ^ canonical_hostname ^ "\n" ^
+ "Please see the error log for details." in
+
+ let to_addrs = ["", email] in
+ let content_type =
+ "text/plain", ["charset", Mimestring.mk_param "UTF-8"] in
+
+ let msg =
+ Netsendmail.compose ~subject ~to_addrs ~content_type body in
+ Netsendmail.sendmail msg;