<?PHP
	include("class.phpmailer.php");
	function myEmail($destination, $destination_name, $subject, $message, $attachment) 
	{
		$emailSent = 0;
		
		$mail             = new PHPMailer();
		
		$mail->AddReplyTo("info@shehawk.co.za","SHE-Hawk Consultants");
					
		$mail->From       = "info@shehawk.co.za";
		$mail->FromName   = "SHE-Hawk Consultants";
					
		$mail->Subject    = "$subject";
					
					
		$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
		$mail->WordWrap   = 50; // set word wrap
					
		$mail->MsgHTML($message);
					
		$mail->AddAddress("$destination", "$destination_name");
				
		if($attachment != "")
		{
			$mail->AddAttachment("$attachment");             // attachment
		}
					
		$mail->IsHTML(true); // send as HTML
					
		if(!$mail->Send()) 
		{
			//Error Ocurred
			  echo "Mailer Error: " . $mail->ErrorInfo;
			  $emailSent = $mail->ErrorInfo;
		} //if
		else 
		{
			//Email Sent Okay
			$emailSent = 1;
			
		}//else
		
		return $emailSent;
		
	}//function


?>