-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsender.php
executable file
·44 lines (35 loc) · 1.1 KB
/
sender.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
<?php
/*
**************************************
* *
* Config here *
* *
**************************************
*/
$to = 'YOUR_EMAIL_ADDRESS';
$siteName = "YOUR_SITE_NAME";
/*
*************************************************************
* *
* Don't Change below code, if you don't know php. *
* *
*************************************************************
*/
$name = $_POST['fname'];
$mail = $_POST['email'];
$subject = $_POST['subj'];
$message = $_POST['mssg'];
if (isset($name) && isset($mail) && isset($message)) {
$mailSub = '[Contact] [' . $siteName . '] '.$subject;
$body = 'Sender Name: ' . $name . "\n\n";
$body .= 'Sender Mail: ' . $mail . "\n\n";
$body .= 'Message Subject: ' . $subject . "\n\n";
$body .= 'Message: ' . $message;
$header = 'From: ' . $mail . "\r\n";
$header .= 'Reply-To: ' . $mail . "\r\n";
$header .= 'X-Mailer: PHP/' . phpversion();
echo mail($to, $mailSub, $body, $header);
}else{
echo '0';
}
?>