_settingsPrefix . 'Subject'); $body = App_Settings_Obj::get($this->_settingsPrefix . 'Body'); $from = App_Settings_Obj::get($this->_settingsPrefix . 'From'); $to = App_Settings_Obj::get($this->_settingsPrefix . 'To', 'parseEmails'); if (!is_array($to)) { $to = array(); } if (!empty($data['areaOfInterestId'])) { $to = array_merge( $to, $this->dataObj->getEmailsForArea(intval($data['areaOfInterestId'])) ); $to = array_unique($to); } if (empty($to)) { return false; } $mailData = $this->_getMailData($data); foreach ($mailData as $field => $value) { $body = str_replace('{' . $field . '}', $value, $body); } $mail = new Qs_Mail(); $mail->setFrom($from); $mail->setSubject($subject); Qs_Mail::cutImageBaseUrl($body, BASE_URL); $mail->setHtml($body, null, WWW_PATH); $mail->addTo($to); $mail->send(); return $this; } }