summaryrefslogtreecommitdiffstats
path: root/usr/local/bin/mail.php
blob: a09f5c64760765a6c6994c5e27b0882fe268ebcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/local/bin/php -q
<?php
require_once("config.inc");
require_once("globals.inc");
require_once("notices.inc");
$options = getopt("s::");

$message = "";

if($options['s'] <> "") {
	$subject = $options['s'];
}


$in = file("php://stdin");
foreach($in as $line){
	$message .= "$line";
}

if (!empty($subject))
	send_smtp_message($message, $subject);
else
	send_smtp_message($message);
?>
OpenPOWER on IntegriCloud