'Verification Code', ]; } /** * 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) { if ($this->validate()) { $name = '=?UTF-8?B?' . base64_encode($this->name) . '?='; $subject = '=?UTF-8?B?' . base64_encode($this->subject) . '?='; $headers = "From: $name <{$this->email}>\r\n" . "Reply-To: {$this->email}\r\n" . "MIME-Version: 1.0\r\n" . "Content-type: text/plain; charset=UTF-8"; mail($email, $subject, $this->body, $headers); return true; } else { return false; } } }