diff --git a/README.md b/README.md index b968661..2a778d6 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,10 @@ ## To run using Docker - ToDo +## To Do +- [ ] Docker +- [ ] kopirovani PGP na click opravit +- [ ] projekty page css +- [ ] contact page odesilani mailu +- [ ] contact page pridat odkazy na dalsi soc site (github atd) + diff --git a/libraries/mail.php b/libraries/mail.php index 3eab640..76b9435 100644 --- a/libraries/mail.php +++ b/libraries/mail.php @@ -22,9 +22,9 @@ class Mail { if (gettype($this->message) == 'string') { if(mail($this->to, $this->subject, $this->message, $this->headers)) { - return 0; + return true; } else { - return 1; + return false; } } } diff --git a/pages/contact/contact.php b/pages/contact/contact.php index efbac94..527c0d4 100644 --- a/pages/contact/contact.php +++ b/pages/contact/contact.php @@ -47,8 +47,13 @@ if(isset($_POST['email']) && isset($_POST['message'])) { $m = new Mail($_POST['email'], 'webmaster@filiprojek.cz', 'Nová zpráva z webu filiprojek.cz', $message); if($m->send()) { + console_log("zprava odeslana"); + console_log("zprava:"); + console_log($m); header('Location: /?sent=true'); } else { + console_log("zprava neodeslana"); + console_log($m); echo "
Něco se nepovedlo, zkuste to znovu... :(
"; echo "Zpět"; }