19 $usage->setDefinitionText(
"Send mail using freedom sendmail");
20 $to =
$usage->addOptionalParameter(
"to",
"email to send to");
24 $file =
$usage->addOptionalParameter(
"file",
"file (can be a file name or stdin");
35 include_once (
"FDL/sendmail.php");
36 include_once (
"WHAT/Lib.FileMime.php");
42 $data = file_get_contents(
'php://stdin');
60 $mime =
'application/x-empty';
63 if (preg_match(
'|text/html|', $mime)) {
64 $message->setBody(
new \Dcp\Mail\Body(file_get_contents(
$file) , $mime));
65 } elseif (preg_match(
'|text|', $mime)) {
66 $message->setBody(
new \Dcp\Mail\Body(file_get_contents(
$file) , $mime));
getMailAddr($userid, $full=false)
sendmail($to, $from, $cc, $bcc, $subject, &$mimemail, $multipart=null)
getSysMimeFile($f, $fn="")
getParam($name, $def="")
must be in core or global type
if($file) if($subject==""&&$file) if($subject=="") $err
Verify arguments for wsh programs.