summaryrefslogtreecommitdiff
path: root/utils/mail.php
blob: 866bad461d3a9a8e4179d312f00e66129e0167b0 (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
25
<?php /* -*- mode: php; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */

class Email {
	public $timestamp;
	public $email;

	public function Email($email, $timestamp)
	{
		$this->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);
	}
}

?>