<?php
class Mailer
{
	var $to;
	var $subject;
	var $message;
	var $fromName;
	var $fromEmail;
	var $replyEmail;
	var $header1;
	var $type;
	var $characterSet= "iso-8859-1";
	
	function _construct()
	{
		$this->to="";
		$this->subject="Appoinment";
		$this->message="";
		$this->fromName="";
		$this->fromEmail="";
		$this->replyEmail="";
		$this->header1="";
		$this->type="text/plain";
	}
	function _destruct()
	{
		
		
	}
	
	private function createHeader()
	{
		$from="From:$this->fromName<$this->fromEmail>\r\n";
		$reply="Reply-To:$this->replyEmail\r\n";
		$params="MIME-Version:1.0\r\n";
		$params.="Content-type:$this->type;Charset=$this->characterSet\r\n";
		
		$this->header1=$from.$reply.$params;
		
		return $this->header1;
	}
	
	public function sendMail()
	{
		$this->createHeader();
		if(@mail($this->to,$this->subject,$this->message,$this->header1))
		{
			return TRUE;
		}
		else
		{
			return FALSE;
		}
	}
	
}

?>