/** * Sends an email to the specified email address using the information collected by this model. * @param string $email the target email address * @return boolean whether the model passes validation */ public function contact($email) { $subject = Yii::getAlias('@site_name') . ' contact received: ' . $this->subject; // Append the from name + email to the body: $message = $this->body . "\r\n \r\n" . "Sent by: {$this->name}<{$this->email}>"; return Utils::sendMail($subject, $message, '{admin}', $this->name, $this->email); }
public function getAmount() { return Utils::formatMoney($this->amount, $this->client->currency_id); }