at path:
ROOT
/
demo
/
old
/
include
/
sendmail.php
run:
R
W
Run
sendmail.php
964 By
2021-05-27 11:23:02
R
W
Run
Delete
Rename
error_log
up
📄
sendmail.php
Save
<?php global $_REQUEST; $response = array('error'=>''); $contact_email = 'your_mail@mail.com'; // type $type = $_REQUEST['type']; // parse parse_str($_POST['data'], $post_data); $user_name = stripslashes(strip_tags(trim($post_data['username']))); $user_email = stripslashes(strip_tags(trim($post_data['email']))); $user_msg =stripslashes(strip_tags(trim( $post_data['message']))); if (trim($contact_email)!='') { $subj = 'Message from CopyPress'; $msg = $subj." \r\nName: $user_name \r\nE-mail: $user_email \r\nMessage: $user_msg"; $head = "Content-Type: text/plain; charset=\"utf-8\"\n" . "X-Mailer: PHP/" . phpversion() . "\n" . "Reply-To: $user_email\n" . "To: $contact_email\n" . "From: $user_email\n"; if (!@mail($contact_email, $subj, $msg, $head)) { $response['error'] = 'Error send message!'; } } else $response['error'] = 'Error send message!'; echo json_encode($response); die(); ?>