-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact_home.php
42 lines (27 loc) · 1.15 KB
/
contact_home.php
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
<?php
if( $_SERVER["REQUEST_METHOD"] == "POST" ){
// $to = "contact@transbelimour.com";
$to = "info@comfex.org";
$from = $_POST['email'];
$nom = $_POST['nom'];
$tel = $_POST['telephone'];
$email = $_POST['email'];
$subject = "vous avez un e-mail de " . $nom;
$msg = $nom . " a rejoint votre newsletter, voici ses information de contact: \n Email: " . $email . "\n Téléphone: " .$tel ;
$headers = 'MIME-Version: 1.0' . "\n"; // Version MIME
$headers .= 'Content-type: text/html; charset=ISO-8859-1' . "\n";
$headers .= 'to: ' .$to . "\n" ;
$headers .= 'from:' .$email . "\n";
if( mail($to, $subject, $msg, $headers) )
{
echo '<script>
alert("Votre message a bien été envoyé ✔👍");
</script>';
}
else // Non envoyé
{
echo '<script> alert("Votre message n\'a pas pu être envoyé ❌. Réessayer SVP 😊 "); </script>';
}
header('Location: index.html');
}
?>