email = $email; $this->timestamp = $timestamp; } public function send($subject, $message, $sender, $replyto) { $headers = "From: " . $sender . "\r\n"; $headers .= "Reply-To: " . $replyto . "\r\n"; $headers .= "Content-Type: text/plain; charset=iso-8859-1\r\n"; $headers .= "X-Mailer: PHP/" . phpversion(); return mail($this->email, $subject, $message, $headers); } } class _Mailinglist { public $mailinglist = array(); public $subj_prefix; public $sender; public $replyto; public $footer; public function add($email) { $key = $email->email; if(array_key_exists($key, $this->mailinglist)) return false; $this->mailinglist[$key] = $email; return true; } public function remove($email) { if(array_key_exists($email, $this->mailinglist)) { unset($this->mailinglist[$email]); return true; } return false; } public function postSingle($email, $subject, $message) { $subject = "[".$this->subj_prefix."] " . $subject; $message .= "\n\n".$this->footer; $email->send($subject, $message, $this->sender, $this->replyto); } public function post($subject, $message) { $sz = sizeof($this->mailinglist); echo "