From a741351d5c91913f22255b8e9e5d4586c70735d6 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 25 Feb 2010 20:30:01 +0000 Subject: Split up some of the mailcode in order to be able to reuse it in the upcoming pressrelease module. --- utils/mail.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 utils/mail.php (limited to 'utils/mail.php') 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 @@ +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 -- cgit v1.2.3