forked from Hari-Prabhat-Kushwaha/Ecomm-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsendemail.php
More file actions
23 lines (21 loc) · 741 Bytes
/
sendemail.php
File metadata and controls
23 lines (21 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
header('Contant-type: application/json');
$status=array('type'=>'success',
'message'=>'Thank you for contact us. As early as possible we will contact you');
$name=@trim(stripslashes($_POST['name']));
$email=@trim(stripslashes($_POST['email']));
$message=@trim(stripslashes($_POST['message']));
$email_from=$email;
$email_to='admin@digitalstore.com';
$body='Name:'.$name."\n\n".'Email:'.$email."\n\n".'Message:'.$message;
$success=@mail($email_to,$subject,$body,'From:<'.$email_from.'>');
?>
<!DOCTYPE HTML>
<html>
<body>
<h1 style="color:orange;">HERE IS A MESSAGE FOR YOU</h1>
<h2 style="color:green;">Thank you for contact us. As early as possible we will contact you.</h2>
<?php
echo json_encode($status);
die;
?>