array(
'text' => 'Nom',
'val' => $_POST['name']
),
1 => array(
'text' => 'Email',
'val' => $_POST['email']
),
2 => array(
'text' => 'Téléphone',
'val' => $_POST['telephone']
),
3 => array(
'text' => 'Message',
'val' => $_POST['message']
),
);
$message = '';
foreach($fields as $field) {
$message .= $field['text'].": " . htmlspecialchars($field['val'], ENT_QUOTES) . " \n";
}
$mail = new PHPMailer(true);
try {
$mail->SMTPDebug = $debug; // Debug Mode
// Step 3 (Optional) - If you don't receive the email, try to configure the parameters below:
//$mail->IsSMTP(); // Set mailer to use SMTP
//$mail->Host = 'mail.yourserver.com'; // Specify main and backup server
//$mail->SMTPAuth = true; // Enable SMTP authentication
//$mail->Username = 'user@example.com'; // SMTP username
//$mail->Password = 'secret'; // SMTP password
//$mail->SMTPSecure = 'tls'; // Enable encryption, 'ssl' also accepted
//$mail->Port = 587; // TCP port to connect to
$mail->AddAddress($email); // Add a recipient
//$mail->AddAddress('person2@domain.com', 'Person 2'); // Add another recipient
//$mail->AddCC('person3@domain.com', 'Person 3'); // Add a "Cc" address.
//$mail->AddBCC('person4@domain.com', 'Person 4'); // Add a "Bcc" address.
$mail->SetFrom($email, $_POST['name']);
$mail->AddReplyTo($_POST['email'], $_POST['name']);
$mail->IsHTML(true); // Set email format to HTML
$mail->CharSet = 'UTF-8';
$mail->Subject = $subject;
$mail->Body = $message;
// Step 4 - If you don't want to attach any files, remove that code below
if (isset($_FILES['attachment']) && $_FILES['attachment']['error'] == UPLOAD_ERR_OK) {
$mail->AddAttachment($_FILES['attachment']['tmp_name'], $_FILES['attachment']['name']);
}
$mail->Send();
$arrResult = array ('response'=>'success');
} catch (phpmailerException $e) {
$arrResult = array ('response'=>'error','errorMessage'=>$e->errorMessage());
} catch (Exception $e) {
$arrResult = array ('response'=>'error','errorMessage'=>$e->getMessage());
}
} else {
$arrResult = array ('response'=>'captchaError');
}
}
?>
Nous contacter | Grand Est - Lorraine | STUDIOGRAPHIX - Agence de communication et publicité
Pour mieux vous accueillir, Studiographix change d'adresse :
Retrouvez-nous à partir du 15 juin au 36 avenue de Thionville à WOIPPY
Envoyé ! Votre message nous est bien parvenu.
Erreur ! Il y a une erreur dans votre formulaire.
Erreur ! Code de vérification erroné.
Nous Contacter
Nos Bureaux
Nos Horaires
Lundi - Vendredi : 10h - 18h
Samedi - Dimanche : Fermé
StudioGraphix vous donne votre chance
Fort de ses années d’expérience, notre agence se modernise et émancipe continuellement son champ d’action. Si notre approche de la communication vous touche, si vous êtes juste passionnés, audacieux et multitâches, envoyez-nous votre candidature par mail.