bonjour a tous!


alors voila, une nouvelle question pour bien demarrer l'annee 2010 :

j'envoie des mails grace a la gracieuse fonction fournie par kitten13 -tout aussi gracieux!

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
<?php
session_start();
 
?>
<meta http-equiv=Content-Type content="text/html; charset=utf-8" /> 
<meta http-equiv="Content-Language" content="fr" />
<?php
function htmlmail($to, $subj, $msg, $from="", $charset="iso-8859-15", $xtraheaders="")
{
	$headers  = "";
	//if($from) $headers .= "From: {$from}\n";
	$headers .= 'From: tonsite.fr <no.reply@tonsite.fr>'."\n";
 
	// Message de Priorité haute
	// -------------------------
	$headers .= "X-Priority: 1  \n";
	$headers .= "X-MSMail-Priority: High \n";
 
    $headers .= "Date: " . date("r") . "\n";
    //$headers .= "Message-ID: " . generateMessageID() . "\n";
	$headers .= "MIME-Version: 1.0\n";
	$headers .= "Content-Type: text/html; charset=\"$charset\"\n";
	$headers .= "Content-Transfer-Encoding: 8bit\n";
	$headers .= $xtraheaders;
	$headers .= "\n";
 
	$ret = mail ($to, $subj, $msg, $headers);
	return $ret;
}
htmlmail('kaking@xxxx.com','éè','<b>àé</b>','jojo@eee.fr');
sauf que mes accents ne passent pas! pourquoi siouplais? parceque l'html est traduis!


merchi!