setHeaders(); $this->setMessageText(); $this->setSubject(); $this->sendMessage(); } private function setHeaders() { $this->headers .= "To: {$_POST['inputTo']} \r\n"; $this->headers .= "From: {$_POST['inputFrom']} \r\n"; $this->headers .= "Reply-To: {$_POST['inputFrom']} \r\n"; } private function setMessageText() { $this->messageText = $_POST['inputMessage']; } private function setSubject() { $this->subject = $_POST['inputSubject']; } private function sendMessage() { if (mail($_POST['inputTo'], $this->subject, $this->message, $this->headers)) { echo '

Сообщение отправлено

'; } else { echo '

Произошла ошибка при отправке сообщения

'; } } } ?> Mail checker

Mail checker

" required autofocus>
" required autofocus>