<?php
class CResponse {
var $type;
var $body;
function setType($params)
{
$this->type = $_type;
$this->body = "The message with subject '".$params['subject']."' you have sent to mailinglist '".$params['list_name']."' has been rejected.\n\n";
if ($params['type'] == "MSG_FILESIZE")
{
$this->body .= "Maximum message size exceeded.\n";
$this->body .= "Maximal allowed size: ".$params['max_size'];
$this->body .= "\nSize of your message: ".$params['msg_size']."\n\n";
} else if ($params['type'] == "SENDER_DENY")
{
$this->body .= "You don't have permission to post messages. You're on sender's deny list.";
} else if ($params['type'] == "SENDER_NOT_ALLOWED")
{
$this->body .= "You don't have permission to post messages. Only privileged users may post messages to this list.";
} else if ($params['type'] == "SENDER_NOT_MEMBER")
{
$this->body .= "You don't have permission to post messages. Only members of this list may post messages.";
}
}
function send($to)
{
global $admin_email;
$from = "From: ".$admin_email;
@mail($to, "Message rejected", $this->body, $from);
}
}
?>
Platon Group <platon@platon.org> http://platon.org/
|