<?PHP $adresat = adres@adres.pl'; // pod ten adres zostanie wysłana wiadomosc if (empty($_POST['email'])){ echo "<script>alert('Pole E-Mail jest puste !'); document.location.href='../kontakt.html';</script>"; } elseif (empty($_POST['content'])) { echo "<script>alert('Pole zawartość jest puste !'); document.location.href='../kontakt.html'</script>;"; } else { $from = $_POST['email']; $header = "MIME-Version: 1.0\r\n"; $header .="Content-type: text/html; charset=UTF-8\r\n"; $header .= "Content-Transfer-Encoding: 8bit\n"; $header .="From: <".$from.">\r\n"; $content =$_POST['content']; if (mail($adresat, 'List ze strony', $content, $header)) echo "<script>alert('Wysłano !'); document.location.href='../kontakt.html';</script>"; } ?>
Serdecznie dziękuję za pomoc