protected function _afterInsert(Kwf_Model_Row_Interface $row) { parent::_afterInsert($row); $link = $this->getData()->url . '?key=' . $row->key; $mail = new Kwf_Mail_Template($this->getData()); $mail->addTo($row->email); $mail->subject = $this->_getPlaceholder('subject'); $mail->link = 'http://' . Kwf_Registry::get('config')->server->domain . $link; $mail->send(); }
protected function _afterInsert(Kwf_Model_Row_Interface $row) { parent::_afterInsert($row); $link = $this->getData()->getAbsoluteUrl() . '?key=' . $row->key; $mail = new Kwf_Mail_Template($this->getData()); $mail->addTo($row->email); $mail->subject = $this->_getPlaceholder('subject'); $mail->link = $link; $mail->send(); }
protected function _afterInsert(Kwf_Model_Row_Interface $row) { parent::_afterInsert($row); $pageName = Kwf_Component_Data_Root::getInstance()->getComponentByDbId($row->component_id)->getParentPage()->name; $recipient = $this->_getRecipient(); $user = $row->getParentRow('User'); if ($recipient['email']) { $tpl = new Kwf_Mail_Template($this); $tpl->data = $this->getData(); $tpl->text = $row->text; $tpl->pageName = $pageName; $tpl->user = $user; $tpl->addTo($recipient['email'], $recipient['name']); $tpl->setFrom($user->email, "{$user->firstname} {$user->lastname}"); $tpl->setSubject($this->getData()->trlKwf('Feedback to page ') . $pageName); $tpl->send(); } }