Le html
Code : Tout sélectionner
<form id="formmail" method="GET" enctype="multipart/mixed" action="../formmail.php" >
<input type="text" name="email" id="mail" placeholder="Votre email"/>
<br>
<input type="text" name="objet" id="objet" placeholder="Objet"/>
<br>
<input type="file" name="nom_fichier" id="button"/>
<br>
<textarea name="message" id="area" placeholder="Message"></textarea>
<br>
<input type="submit" value="Envoyer" id="submit" class="inputtext" />
</form>
Code : Tout sélectionner
<?php
//=====Déclaration des messages au format texte et au format HTML.
$message_txt .= $_GET['message'];
$message_html .= '<html><head></head><body>'.$_GET['message'].'</body></html>';
//==========
//=====Création de la boundary
$boundary = "-----=".md5(rand());
//==========
//=====Définition du sujet.
$sujet .= $_GET['objet'];
//=========
//=====Création du header de l'e-mail.
$header = 'From: \''.$_GET['email'].'\'<'.$_GET['email'].'>'.$passage_ligne;
$header = 'Reply-to: \''.$_GET['email'].'\'<'.$_GET['email'].'>'.$passage_ligne;
$header.= "MIME-Version: 1.0".$passage_ligne;
$header.= "Content-Type: multipart/alternative;".$passage_ligne." boundary=\"$boundary\"".$passage_ligne;
?>
Comment faire ? Merci d'avance pour vos réponses