diff options
Diffstat (limited to 'utils/mail.php')
-rw-r--r-- | utils/mail.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/utils/mail.php b/utils/mail.php new file mode 100644 index 0000000..866bad4 --- /dev/null +++ b/utils/mail.php @@ -0,0 +1,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); + } +} + +?>
\ No newline at end of file |