from = $from; $this->to = $to; $this->subject = $subject; $this->headers = $headers; } public function send() { // odeslání e-mailu $headers = 'From: noreply@fofrweb.com' . "\r\n" . 'Reply-To: support@fofrweb.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); $this->headers = $headers; if (gettype($this->message) == 'string') { if(mail($this->to, $this->subject, $this->message, $this->headers)) { return 0; } else { return 1; } } } }