/**
* @param IFeedbackForm $form
* @param FeedBack|null $feedBack
* @return bool
*/
public function sendConfirmation(IFeedbackForm $form, FeedBack $feedBack = null)
{
$emailBody = Yii::app()->controller->renderPartial('feedbackConfirmationEmail', ['model' => $feedBack], true);
$result = $this->mail->send($this->module->notifyEmailFrom, $form->getEmail(), Yii::t('FeedbackModule.feedback', 'Your proposition on site "{site}" was received', ['{site}' => Yii::app()->name]), $emailBody);
if ($result) {
Yii::log(Yii::t('FeedbackModule.feedback', 'Feedback: Notification for user was sent to email successfully'), CLogger::LEVEL_INFO, FeedbackModule::$logCategory);
} else {
Yii::log(Yii::t('FeedbackModule.feedback', 'Feedback: can\'t send message'), CLogger::LEVEL_INFO, FeedbackModule::$logCategory);
}
return $result;
}