hi can anyone tell me how i can parse my own custom template in sugar bean. I mean mail has been sent out by this but i want to insert a custom template in my mail and not a text mail. Does any one has idea how i can achieve this.

I have one template crmLeadEmailtemplate.html which i have place in include/language/ . And in sugarBean.php i have placed code like this

if($this->module_dir == "Leads"){
$xtpl = new XTemplate("include/language/crmLeadEmailtemplate.html");

}
else{
$xtpl = new XTemplate("include/language/{$current_language}.notify_template.html");
}

as i wanted to display custom template when lead is created. But i m getting blank mails . I have written variables which i like to be displayed in my mail but i have got no

Any help is highly appreciated