-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmail.php
More file actions
29 lines (24 loc) · 753 Bytes
/
Copy pathmail.php
File metadata and controls
29 lines (24 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="generator" content="AlterVista - Editor HTML"/>
<title></title>
</head>
<body>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$to = 'example@gmail.com';
$subject = 'Contact Module';
$message = $_POST['messaggio'];
$headers = 'From: '.$_POST['email'].'' . "\r\n" .
'Reply-To: example@gmail.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
include('header.php');
echo'<h2 style="position:absolute; top:50%; left:50%; font-size:20; color:black;" id="entra">Thank you for contacting me!</h2>';
}
else header('error404.php');
?>
</body>
</html>