
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] Redhat Enterprise and PHPs MBSTRING
You should use this kind of script, it works both with the contents and with
the subject fields.
function send_mail($receiver,$subject,$mailcontent) {
$sender_mail=sendermail@example.com;
$stInputEnc="SJIS";
$stOutputEnc = "SJIS" ;
$stInternalEnc = "SJIS" ;
ini_set( "mbstring.http_input", $stInputEnc ) ;
ini_set( "mbstring.http_output", $stOutputEnc ) ;
ini_set( "mbstring.internal_encoding", $stInternalEnc ) ;
$stHeader =
"From: ".mb_encode_mimeheader($sender_mail)."\n".
"MIME-Version: 1.0\n".
"Content-Type: text/plain; charset=\"ISO-2022-JP\"\n".
"Content-Transfer-Encoding: 7bit\n".
"Reply-To: $sender_mail\n";
mb_language( "ja");
mb_send_mail($receiver, $subject, $mailcontent, $stHeader,"$sender_mail")
;
}
by the way, I'm using it on debian but it should work anyway
Alex
----- Original Message -----
From: "Robert Fisher" <robert@example.com>
To: "David E" <dave@?om>
Cc: <tlug@example.com>
Sent: Thursday, March 31, 2005 4:00 PM
Subject: Re: [tlug] Redhat Enterprise and PHPs MBSTRING
> David E wrote:
>
> >From: Robert Fisher <robert@example.com>
> >Subject: [tlug] Redhat Enterprise and PHPs MBSTRING
> >Date: Thu, 31 Mar 2005 13:55:38 +0900
> >
> >
> >
> >>I am installing a system and for some reason we are having a problem
> >>with encoding of japanese text to be sent out in emails. The emails
> >>either come in "mojibake" or cutoff. Has anyone else had any problems
> >>using Redhat Linux Enterprise with PHP and MBString?
> >>
> >>
> >
> >You've probably already thought of this, but just in case...
> >
> >Have you checked the mb-related settings in the two php.ini files, and/or
> >compared the output of phpinfo() on the 2 systems?
> >
> >-dave
> >
> >
> >
> >
> Dave,
>
> Thanks for your response, yeah was the very first thing we did. That
> step there usually the one that kicks us in the butt.
>
> Would the Locale of the server have any effect? on both servers the
> locale is english utf8.
>
> Regards,
> Robert Fisher
>
> --
> The TLUG server is hosted by Open Source Development Lab Japan.
> http://www.osdl.jp/
>
> To unsubscribe from this mailing list,
> please see the instructions at <http://www.tlug.jp/list.html>
>
Home |
Main Index |
Thread Index