-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemail.php
More file actions
27 lines (23 loc) · 784 Bytes
/
email.php
File metadata and controls
27 lines (23 loc) · 784 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
<?php
if(isset($_REQUEST['email']) and $_REQUEST['email']!="")
{
$to = $_REQUEST['email']; //"zaidbinkhalidk@yahoo.com"; email sended To
$from = "zaidbinkhalidk@yahoo.com"; // Write your email address here. email send From
$name = $_REQUEST['name']; //form Name here
$message = $_REQUEST['message']; //form Message here
$subject = "This is subject"; //Your subject here
$body = "<b>".$to."</b>";
$body .= "<h1>".$name."</h1>";
$body .= "<h1>".$message."</h1>";
$header = "From:".$from." \r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-type: text/html\r\n";
$retval = mail($to,$subject,$body,$header);
if($retval==true){
echo 1;
}
else{
echo 0;
}
}
?>