Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (isset($_POST['email']) && isset($_POST['subject']) && isset($_POST['message'])){
- $emailTo = "YOUR EMAIL";
- $subject = $_POST['subject'];
- $body = $_POST['message'];
- $header = "From: ".$_POST['email'];
- if(mail($emailTo, $subject, $body, $header)){
- $res = array('status' => "ok");
- echo json_encode($res);
- }else{
- $res = array('status' => "bad");
- echo json_encode($res);
- }
- }else{
- $res = array('status' => "bad");
- echo json_encode($res);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement