Copie cachée

jicao Messages postés 48 Statut Membre -  
 Obeet -
bonjour voici le code demon fichier d'envoi de mail mais la les destinataires voit tous la liste de mes contact je voudrais que les destinataires soit en copie cachée
pouvez vous m'aider

code :

$boundary = "-----=".md5(uniqid(rand()));
$header = "MIME-Version: 1.0\r\n";
$header .= "Content-Type: multipart/mixed; boundary=\"$boundary\"\r\n";
$header .= "\r\n";
if ("$file1" == ''){
$msg = "\r\n";
$msg .= "--$boundary\r\n";
$msg .= "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n";
$msg .= "Content-Transfer-Encoding:8bit\r\n";
$msg .= "\r\n";
$msg .= "$comment\r\n";
$msg .= "\r\n";
}
else{
$msg = "\r\n";
$msg .= "--$boundary\r\n";
$msg .= "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n";
$msg .= "Content-Transfer-Encoding:8bit\r\n";
$msg .= "\r\n";
$msg .= "$comment\r\n";
$msg .= "\r\n";
$file = "$file1";
$fp = fopen($file, "rb");
$attachment = fread($fp, filesize($file));
fclose($fp);
$attachment = chunk_split(base64_encode($attachment));
$msg .= "--$boundary\r\n";
$msg .= "Content-Type: image/gif; name=\"$file\"\r\n";
$msg .= "Content-Transfer-Encoding: base64\r\n";
$msg .= "Content-Disposition: inline; filename=\"attach.gif\"\r\n";
$msg .= "\r\n";
$msg .= $attachment . "\r\n";
$msg .= "\r\n\r\n";
$msg .= "--$boundary--\r\n";
}
$destinataire = "$email";
$expediteur = "info@musichall.be";
$reponse = $expediteur;
mail( $destinataire, "$sujet", $msg, "nReply-to: $reponse\r\nFrom: $expediteur\r\n".$header);
echo"<center>La Mail a bien été envoyé<br>Merci</center>";
?>
</body>
</html>

     _                           _
_/   -*= JiC@0 =*-  \_

1 réponse

  1. Obeet
     
    Tu pourrais essayer d'envoyer plusieurs mails, comme ca pas de probleme mais bon, c'est pas ideal, je ne connais pas assez la fonction mail pour t'aider plus j'en ai peur (merci free :-( )

    . .
    \_/
    0