## $Id: sendsys.pl 4932 2001-07-19 00:32:56Z rra $ ## ## sendsys control message handler. ## ## Copyright 2001 by Marco d'Itri ## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions ## are met: ## ## 1. Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. ## ## 2. Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in the ## documentation and/or other materials provided with the distribution. use strict; sub control_sendsys { my ($par, $sender, $replyto, $site, $action, $log, $approved, $headers, $body) = @_; my ($where) = @$par; if ($action eq 'mail') { my $mail = sendmail("sendsys $sender"); print $mail <; print $mail "\n"; close NEWSFEEDS; close $mail or logdie("Cannot send mail: $!"); logger($log, "sendsys $sender to $replyto", $headers, $body) if $log; } } 1;