Ok first i will do my best not to make too much mistakes, my english is far then perfect...
I have a problem like alot of people wiht the email accent encoding.
First every single files in my website is in utf-8 ( dreamweaver -propreties-encode-utf-
My Mysql is in utf-8
and still when people send email the user received with @ instead of é ect...
Here is the code of the @mail function in question :
<?php
session_start ( ) ;
require ( "config.php" ) ;
if ( intval ( $_POST["AdID"] ) > 0 )
{
if ( $_SESSION["capCode"] == $_POST["BBUV"] )
{
require_once ( "classes/manipulate.php" ) ;
$data = new DataManipulator ;
$siteSettings = $data->select ( "SiteManager" , "*" , null , 0 , 50 ) ;
$app_init_data = array ( ) ;
foreach ( $siteSettings as $site )
{
$app_init_data[$site["SiteVariable"]] = $site["SiteValue"] ;
}
$classified = $data->select ( "Classified" ,"*" , array ( "AdID" => intval ( $_POST["AdID"] ) ) ) ;
$classified = $classified[0] ;
$data->update ( "Classified" , " Replies=Replies+1" , array ( "AdID" => intval ( $_POST["AdID"] ) ) ) ;
@mail ( $classified["EmailAddress"] , "Votre annonce sur ".base_url , "Bonjour, \n vous avez un message pour votre annonce '".$classified["AdTitle"]."' par un visiteur avec l'adresse courriel '".$_POST["FromEmailAddress"]."' : \n ".$_POST["EmailText"]." \n\n --------------------- \n ".$app_init_data["SiteName"]." <strong><strong>Svp repondre a l'adresse courriel du membre et non a celui-ci. Merci de votre confiance</strong></strong>, \n". base_url , "from:".$app_init_data["SiteTitle"]."<".$app_init_data["Replyemail"].">" ) ;
$_SESSION["str_system_message"] = "Votre message a été envoyé." ;
}
else
$_SESSION["str_system_message"] = "Code de sécurité invalide." ;
}
header ( "location:".$_SERVER['HTTP_REFERER'] ) ;
?>
This part : $_SESSION["str_system_message"] = "Votre message a été envoyé." ; show the accent correcly because my page is encoded in utf-8
The problem is there :
@mail ( $classified["EmailAddress"] , "Votre annonce sur ".base_url , "Bonjour, \n vous avez un message pour votre annonce '".$classified["AdTitle"]."' par un visiteur avec l'adresse courriel '".$_POST["FromEmailAddress"]."' : \n ".$_POST["EmailText"]." \n\n --------------------- \n ".$app_init_data["SiteName"]." <strong><strong>Svp repondre a l'adresse courriel du membre et non a celui-ci. Merci de votre confiance</strong></strong>, \n". base_url , "from:".$app_init_data["SiteTitle"]."<".$app_init_data["Replyemail"].">" ) ;
if i use accent in this part of the code it show incorrectly.
Its the first time i post on this forum, so if i forget something , please let me know.
Zack1475