-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemail.php
More file actions
30 lines (22 loc) · 896 Bytes
/
Copy pathemail.php
File metadata and controls
30 lines (22 loc) · 896 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
28
29
<?php
// EDIT THE 2 LINES BELOW AS REQUIRED
$send_email_to = "transitnow280@gmail.com";
$email_subject = "Connection on your Website";
//GET FIELDS FROM YOUR HTML FORM, THE NAME PROPERTY IS PASSED IN THE $_POST ARRAY
//E.G IF YOU HAVE A FIELD WITH name="email" YOU'LL GET THE VALUE IN PHP SCRIPT
//LIKE BELOW
$email = $_POST['email'];
$name = $_POST['name'];
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers .= "From: ".$email. "\r\n";
/*Customize your message here*/
$message = "<strong>Email = </strong>".$email."<br>";
$message .= "<strong>Name = </strong>".$name."<br>";
$message .= "<strong>Message = </strong>Formify Sample Message!<br>";
@mail($send_email_to, $email_subject, $message,$headers);
header('Content-type: text/json');
$return_array['success'] = '1';
echo json_encode($return_array);
die();
?>