Quote
今日 = kyou = today. Its kind of an irregularity. Konnichiwa is always written こんにちは
Posted 31 March 2008 - 12:25 AM
Quote
Posted 31 March 2008 - 07:38 AM
This post has been edited by Beavis: 31 March 2008 - 07:39 AM
Posted 31 March 2008 - 07:46 AM
Posted 31 March 2008 - 11:45 AM
Quote
;; Set output_handler to perform multibyte conversion output_handler = mb_output_handler
Quote
extension=php_mbstring.dll
<?php phpinfo(); ?>
Quote
extension=php_mbstring.dll enable-mbstring ;; Set default language to Japanese mbstring.language = Japanese ;; HTTP input encoding translation is enabled mbstring.encoding_translation = On ;; Set HTTP input encoding conversion to auto mbstring.http_input = auto ;; Convert HTTP output to Shift_JIS mbstring.http_output = Shift_JIS ;; Set internal encoding to EUC-JP mbstring.internal_encoding = EUC-JP ;; Do not print invalid characters mbstring.substitute_character = none ;; Set output_handler to perform multibyte conversion output_handler = mb_output_handler
Quote
Posted 31 March 2008 - 08:50 PM
Posted 31 March 2008 - 09:40 PM
<head>
<?php
require_once("path/to/file/metatag.php");
?>
</head>
Posted 31 March 2008 - 11:17 PM
Posted 31 March 2008 - 11:43 PM
Posted 01 April 2008 - 12:01 AM
Posted 14 April 2008 - 01:53 AM
function japanese_mail($to, $subject, $message)
{
$to = mb_convert_encoding($to, "ISO-2022-JP");
$subject = mb_convert_encoding($subject, "ISO-2022-JP");
$message = mb_convert_encoding($message, "ISO-2022-JP");
require_once("/path/to/class.phpmailer.php");
$mail = new PHPMailer();
$mail->SetLanguage( 'ja', 'language/' );
$mail->IsSMTP();
$mail->Host = "mail.host.com:26"; // insert your host and port number here using this format.
$mail->From = "no-reply@host.com"; // insert your reply address here. My host requires that this address exist for it to work, yours may or may not.
$mail->FromName = "From Name ";
$mail->Sender = "no-reply@mail.host.com"; // insert your reply address again here
$mail->Mailer = "smtp";
$mail->AddAddress($to);
$mail->Subject = mb_encode_mimeheader($subject, "ISO-2022-JP", "B", "\n");
$mail->Body= $message;
$mail->SMTPAuth = "true";
$mail->Username = "no-reply@host.com"; // add the username for your mail account here
$mail->Password = "password"; // add the password for your mail account here
if(!$mail->Send())
{
return false;
}
else
{
return true;
}
}
$to = to@address.com;
$subject = "the subject of the mail";
$message = "the message you want to send";
if(japanese_mail($to, $subject, $message))
{
echo "the mail was sent";
}
else
{
echo "mail sending failed";
}
phpmailer.zip (31.95K)
This post has been edited by haku: 15 April 2008 - 08:27 AM
Posted 14 April 2008 - 06:24 PM
haku, on Apr 14 2008, 03:53 PM, said:
function japanese_mail($to, $subject, $message)
{
$to = mb_convert_encoding($to, "ISO-2022-JP");
$subject = mb_convert_encoding($subject, "ISO-2022-JP");
$message = mb_convert_encoding($message, "ISO-2022-JP");
require_once("/path/to/class.phpmailer.php");
$mail = new PHPMailer();
$mail->SetLanguage( 'ja', 'language/' );
$mail->IsSMTP();
$mail->Host = "mail.host.com:26"; // insert your host and port number here using this format.
$mail->From = "no-reply@host.com"; // insert your reply address here. My host requires that this address exist for it to work, yours may or may not.
$mail->FromName = "From Name ";
$mail->Sender = "no-reply@mail.host.com"; // insert your reply address again here
$mail->Mailer = "smtp";
$mail->AddAddress($to);
$mail->Subject = mb_encode_mimeheader($subject, "ISO-2022-JP", "B", "\n");
$mail->Body= $message;
$mail->SMTPAuth = "true";
$mail->Username = "no-reply@host.com"; // add the username for your mail account here
$mail->Password = "password"; // add the password for your mail account here
if(!$mail->Send())
{
return false;
}
else
{
return true;
}
}
$to = to@address.com;
$subject = "the subject of the mail";
$message = "the message you want to send";
if(japanese_mail($to, $subject, $message))
{
echo "the mail was sent";
}
else
{
echo "mail sending failed";
}
Posted 14 April 2008 - 06:26 PM