[FX.php List] Filemaker French character and PHP mail function

Dominique Uris dominique at macsol.ca
Wed Jan 27 07:01:43 MST 2010


Hi List,

I'm trying to sent some french character as csv file email attachment.  
I'm able to sent the email attachment correctly but all the french  
character get translated to other character like "ç" to "ç" ,  
etc. I tried using php function "mb_convert_encoding" without any  
success using the line $string = mb_convert_encoding($input_string,  
"iso-8859-1", "UTF-8");

I have to say I copied my code to sent email with attachment from the  
internet, because I was on a short schedule so maybe there also  
something wrong in the code...


> $subject = $subject;
> $to = $email_to;
> $headers = "From: ".$email_from."\r\nReply-To: ".$email_from."\n";
> $headers .= 'MIME-Version: 1.0' . "\n";
> $headers .= 'Content-Type: multipart/mixed;
>     boundary="----=_NextPart_001_0011_1234ABCD.4321FDAC"' . "\n";
>
> $message = '
>
> This is a multi-part message in MIME format.
>
> ------=_NextPart_001_0011_1234ABCD.4321FDAC
> Content-Type: text/plain;
>         charset="iso-8859-1"
> Content-Transfer-Encoding: 7bit
>
> '. $body .'
>
> ------=_NextPart_001_0011_1234ABCD.4321FDAC
> Content-Type: text/csv;  name="';
>
> $message .= "$thisfile";
> $message .= '"
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment; filename="';
> $message .= "$thisfile";
> $message .= '"
>
> ';
> $message .= $encoded;
> $message .= '
>
> ------=_NextPart_001_0011_1234ABCD.4321FDAC--
>
> ';

Thanks in advance.

Dominique
dominique at macsol.ca


More information about the FX.php_List mailing list