-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmail.php
146 lines (114 loc) · 3.11 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!--It takes 48hrs or longer, when a change to the php file is
made, for php services to automate the email sending process-->
<?php
$mail_to_send_to = "[email protected]";
//$from_email = $_REQUEST['email'];
if(isset($_REQUEST['email'])){
$from_email = $_REQUEST['email'];
}else{
$from_email = $_GET['email'];
}
//$sendflag = $_REQUEST['sendflag'];
if(isset($_REQUEST['sendflag'])){
$sendflag = $_REQUEST['sendflag'];
}else{
$sendflag = $_GET['sendflag'];
}
//$name=$_REQUEST['name'];
if(isset($_REQUEST['name'])){
$name = $_REQUEST['name'];
}else{
$name = $_GET['name'];
}
//$email=$_REQUEST['email'];
if(isset($_REQUEST['email'])){
$email = $_REQUEST['email'];
}else{
$email = $_GET['email'];
}
$subject=$_REQUEST['subject'];
//if(isset($_REQUEST['subject'])){
//$subject = $_REQUEST['subject'];
//}else{
//$subject = $_GET['subject'];
//}
if ( $sendflag == "send" )
{
$email = $_REQUEST['email'] ;
$message= "\r\n" . "Name: $name" . "\r\n"; //get recipient name in contact form
$message = $message.$_REQUEST['message'] . "\r\n";//add message from the contact form to existing message(name of the client)
$headers = "From: $from_email" . "\r\n" . "Reply-To: $email";
$a = mail( $mail_to_send_to, $subject, $message, $headers );
if ($a)
{
print("Message was sent, you can send another one");
} else {
print("Message wasn't sent, please check that you have changed emails in the bottom");
}
}
echo '
<!DOCTYPE html>
<html lang="en">
<head>
<title>Contact Form</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
body {
background-color: black;
font-family: "Montserrat", sans-serif;
}
h1 {
color: gray;
font-size: 40px;
font-weight: 600;
text-align: center;
margin-top: 100px;
}
p {
color: gray;
font-size: 20px;
font-weight: 400;
text-align: center;
margin-top: 20px;
}
a {
color: gray;
}
a:hover {
color: greenyellow;
}
</style>
</head>
<body>
<div class="container">
<h1>Thank you for contacting me via my github.io portfolio.
<br><br>
Your inquiry is important to me.
<br>
I will get back to you as soon as possible.
</h1>
<p class="back">To return to the github.io portfolio click
<a href="index.html" target="blank">homepage</a>
</p>
</div>
</body>
<br><br><br><br><br><br><br>
<footer>
<p class="footer">
<c>
a production of
<br>
Shade Leaf Engineering & Consulting, LLC © 2018-2023
<br>
parent company of Spitfire Productions, LLC © 2014-2023
<br>
All Rights Reserved.
</c>
</p>
</footer>
</html>
';
?>