-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmail.php
73 lines (60 loc) · 1.56 KB
/
mail.php
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!doctype html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Contact author</title>
<link href="bootstrap/css/bootstrap.css" rel="stylesheet" media="screen">
<link href="bootstrap/css/bootstrap-theme.css" rel="stylesheet" media="screen">
<style>
body {
margin: 0;
padding: 60px 0;
background: url(img/full-bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
div {
width: 400px;
background: #fff;
margin: 100px auto;
text-align: center;
padding: 10px 20px 20px;
-webkit-box-shadow: 0 2px 10px rgba(0,0,0,.3);
-moz-box-shadow: 0 2px 10px rgba(0,0,0,.3);
box-shadow: 0 2px 10px rgba(0,0,0,.3);
border-radius: 6px;
}
a.btn {
min-width: 100px;
}
</style>
</head>
<body>
<?php
$to = "Michail Nikolaev <[email protected]>";
$email = $_REQUEST['email'];
$text = $_REQUEST['message'];
$subject = "Сайт рации. Письмо разработчику от ".$email;
$header = "Content-Type: text/html; charset=utf-8 \r\n"
."From: <".$email.">\r\n";
if (mail($to, '=?UTF-8?B?'.base64_encode($subject).'?=', $text, $header)) {
print "
<div>
<h3>Thank you for your feedback</h3>
<p>Author will receive your letter soon.</p>
<p><a href='http://radio.task-force.ru' class='btn btn-default'>ОК</a></p>
</div>
";
} else {
print "
<div>
<h3>Hmm, something wrong :(</h3>
<p><a href='javascript:history.back();' class='btn btn-default'>Go back</a></p>
</div>
";
}
?>
</body>
</html>