<?php
/*
######################      CWB      #######################
############################################################
CWB PRO			$Name: release_version1_0_03112006 $
Revision		$Revision: 1.1 $
Author			$Author: zelteto $
Created 03/01/03        $Date: 2006/10/18 11:53:33 $
Writed by               GraFX (webmaster@grafxsoftware.com)
Scripts Home:           http://www.grafxsoftware.com
############################################################
*/
	include_once("../config.inc.php");
	include_once(INCLUDE_PATH.'cls_session.php');
	$sess = new MYSession();
	include_once(INDEX_PATH."cls_fast_template.php");
	include_once(INCLUDE_LANGUAGE_PATH.$LANG.".inc.php");
	include_once(INCLUDE_LANGUAGE_PATH.$LANG.".admin.inc.php");

	include_once(INCLUDE_PATH."cls_universal_mailsender.php");
	

	$to = ""; $subject = ""; $headers = ""; $message ="";
	
	$fte = new FastTemplate(EMAIL_PATH);
	$fte->define(array("main"=>"emailpasswordrecovery.html"));		
	$fte->assign("USERID", USER);
	$fte->assign("PASSWORD", PASSWORD);
	$fte->multiple_assign_define("LANG_");
	$fte->multiple_assign_define("CONF_");
	$fte->parse("mainContent", "main");
	$fte->showDebugInfo(ERROR_DEBUG);
	$message = $fte->fetch("mainContent");

	// se trimite scrisoarea
	$univMail= new UniversalMailSender("2");
	// setting up the to address
	$univMail->setToAddress(EMAIL_INREG,EMAIL_NAME);
	// setting up from address
	$univMail->setFromAddress(EMAIL_INREG, EMAIL_NAME);
	// setting up subject
	$univMail->setSubject(LANG_EMAIL_RECOVERY);
	// setting up from text message if the type is text message
	$univMail->setTextMessage($message);
	// setting up from text message if the type is html message
	$univMail->setHtmlMessage($message);
	// sending the mail; returns an error message
	$ok=$univMail->SendMail();
	
	header("Location: login.php?message=".LANG_PASWORD_SENTSUCCESSFULLY);
?>