je te donne mon code quand je suis au boulot qui permet un texte en html et une pièce jointe en excel.... pour l'exemple
function mail_attach($expediteur,$destinataire,$cc,$reponse,$subject,$content,$file,$mime)
{
$boundary = "-----=".md5(uniqid(rand()));
$header = "MIME-Version: 1.0\r\n";
$header .= "Content-Type: multipart/mixed; boundary=\"$boundary\"\r\n";
$header .= "bcc:$cc\r\n";
$header .= "\r\n";
$msg = "Je vous informe que ceci est un message au format MIME 1.0 multipart/mixed.\r\n";
$msg .= "--$boundary\r\n";
$msg .= "Content-Type: text/html; charset=\"iso-8859-1\"\r\n";
$msg .= "\r\n";
$msg .= "$content\r\n";
$msg .= "\r\n";
$attachment = chunk_split(base64_encode($file));
$msg .= "--$boundary\r\n";
$msg .= "Content-Type: $mime; name=\"fiche.xls\"\r\n";
$msg .= "Content-Transfer-Encoding: base64\r\n";
$msg .= "Content-Disposition: inline; filename=\"fiche.xls\"\r\n";
$msg .= "\r\n";
$msg .= $attachment . "\r\n";
$msg .= "\r\n\r\n";
$msg .= "--$boundary--\r\n";
return mail($destinataire, $subject, $msg,"Reply-to: $reponse\r\nFrom: $expediteur\r\n".$header);
// echo"$content";
}
mail_attach($from, $to,$cc, $reponse, $subject, $message,$attachement, "application/vnd.ms-excel")