getConfiguration()->loadHelpers('crossAppLink');
$mailer = sfContext::getInstance()->getMailer();
$estate = $this->getEstate();
$to = $estate->hasBrokerUser() ? $estate->getBrokerUser()->getEmailAddress() : saSettings::get('default_demand_mail');
$body = $this->getCustomer().' zaslal/a poptávku na nemovitost: "'.$this->getEstateName().'"
';
$body .= 'Detail poptávky zobrazíte zde';
$body .= '
-- Real-data.cz';
//$to = 'tomas@naibrt.cz';
$mailer->composeAndSend(saSettings::get('sender_demand_mail'), $to, 'Nová poptávka', $body);
$body = 'Dobrý den,
';
$body .= 'tohle je informační email ze serveru www.realdata.cz
';
$body .= 'Dnes ('.date('d.m.Y').') jste zažádal o informace k inzerátu '.$estate->getName().'.
';
if($estate->hasBrokerUser())
{
$body .= 'Tento inzerát má na starosti makléř '.$estate->getBrokerUser()->getName().', '.$estate->getBrokerUser()->getTel().', '.$estate->getBrokerUser()->getEmailAddress().'
';
}
$body .= 'Ozve se Vám v co nejkratším možném termínu.
';
$body .= 'Děkujeme, Váš www.realdata.cz';
$mailer->composeAndSend(saSettings::get('sender_demand_mail'), $this->getEmail(), 'Nová poptávka', $body);
}
public function isComplet()
{
return $this->getIsComplet();
}
}