test code
This commit is contained in:
parent
37c281a25d
commit
79331ce222
@ -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)
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 "<p>Něco se nepovedlo, zkuste to znovu... :(</p>";
|
||||
echo "<a href='/'>Zpět</a>";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user