asdf
public text v1 · immutable 1 <?php
2
3 $to = "email@gmail.com";
4 $backto = "skickat.html";
5
6 if(isset($_POST['mail'])) {
7
8 $from = $_POST['mail_from'];
9 $subject = 'Mail from contact form';
10 $message = "Message from: ".$_POST['mail_from']."\n\n".$_POST['message'];
11 $headers = "From: ".$from." \r\n
12 Reply-To: ".$from." \r\n
13 X-Mailer: PHP/" . phpversion();
14
15 mail($to, $subject, $message, $headers);
16
17 }
18
19 header("Location: ".$backto);
20
21 ?>