Ejemplo n.º 1
0
 /**
  * [sendNotifyEmail description]
  *
  * @return [type] [description]
  */
 function sendNotifyEmail()
 {
     $params = JComponentHelper::getParams('com_babioonad');
     $row = JTable::getInstance('contact', 'BabioonAdTable');
     $row->load($this->conid);
     $ad = JTable::getInstance('ad', 'BabioonAdTable');
     $ad->load($row->adid);
     $fromname = $params->get('sendername');
     $from = $params->get('senderemail');
     $email = $ad->email;
     $body = BabioonAdHelper::html2txt($row->text);
     $subject = 'Kontaktaufnahme von: ' . $row->email;
     $mail = JFactory::getMailer();
     if (!$mail->sendMail($from, $fromname, $email, $subject, $body, 1)) {
         return false;
     }
     return true;
 }