-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess.php
More file actions
86 lines (46 loc) · 1.65 KB
/
process.php
File metadata and controls
86 lines (46 loc) · 1.65 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
if (isset($_POST['fname'])){
$fname=htmlentities($_POST['fname']);
$email=htmlentities($_POST['email']);
$phone=htmlentities($_POST['phone']);
$subject=htmlentities($_POST['subject']);
$cameras=htmlentities($_POST['cameras']);
$state=htmlentities($_POST['state']);
$customer=htmlentities($_POST['customer']);
$message1=htmlentities($_POST['message1']);
$estado = $_POST["estado"];
/*SIGUE RECOLECTANDO DATOS PARA FUNCION MAIL*/
$message = '';
$message .= '<h4>New message from '.$estado. ':</h4> ';
$message .= '<p>Name: '.$fname.'</p> ';
$message .= '<p>Email: '.$email.'</p> ';
$message .= '<p>Phone: '.$phone.'</p> ';
$message .= '<p>Subject: '.$subject.'</p> ';
$message .= '<p>State: '.$state.'</p> ';
$message .= '<p>Number of cameras: '.$cameras.'</p> ';
$message .= '<p>Interested in: </p>';
if(isset($_POST['interested']) and $_POST['interested']!="") {
$interestedTodas = $_POST['interested'];
$num1 = count($interestedTodas);
for ($n=0; $n<$num1; $n++) {
$message .= $interestedTodas[$n];
$message .= "<br>";
}
}
$message .= '<p>Customer Type: '.$customer.'</p>';
$message .= '<p>Message: '.$message1.'</p> ';
$header = "MIME-Version: 1.0\r\n";
$header .= "Content-type: text/html; charset=UTF-8\r\n";
$header .= "X-MSMail-Priority: normal\n";
$header .= "Return-Path: ".$email."\r\n";
$header .= "Reply-To: ".$email."\r\n";
$header .= "From: ". $fname . " <" . $email . ">\r\n";
$email='sales@hipcam.com';
//$email = 'danferweb@gmail.com';
if (mail($email,$subject,$message,$header)){
echo 'success';
} else {
echo 'No se pudo enviar el mensaje.';
}
}
?>