--- roundcube.103org/program/steps/mail/sendmail.inc 2014-12-11 22:33:34.000000000 +0900 +++ roundcube/program/steps/mail/sendmail.inc 2014-12-17 07:14:16.000000000 +0900 @@ -68,7 +68,7 @@ $message_id = $COMPOSE['param']['message-id']; // set default charset -$message_charset = isset($_POST['_charset']) ? $_POST['_charset'] : $OUTPUT->get_charset(); +$message_charset = 'ISO-2022-JP'; $EMAIL_FORMAT_ERROR = NULL; $RECIPIENT_COUNT = 0; @@ -467,7 +467,7 @@ $transfer_encoding = $RCMAIL->config->get('force_7bit') ? 'quoted-printable' : '8bit'; } else { - $text_charset = 'US-ASCII'; + $text_charset = $message_charset; $transfer_encoding = '7bit'; } @@ -478,7 +478,7 @@ // encoding settings for mail composing $MAIL_MIME->setParam('text_encoding', $transfer_encoding); $MAIL_MIME->setParam('html_encoding', 'quoted-printable'); -$MAIL_MIME->setParam('head_encoding', 'quoted-printable'); +$MAIL_MIME->setParam('head_encoding', 'base64'); $MAIL_MIME->setParam('head_charset', $message_charset); $MAIL_MIME->setParam('html_charset', $message_charset); $MAIL_MIME->setParam('text_charset', $text_charset); @@ -487,7 +487,7 @@ if (function_exists('mb_encode_mimeheader')) { mb_internal_encoding($message_charset); $headers['Subject'] = mb_encode_mimeheader($headers['Subject'], - $message_charset, 'Q', "\r\n", 8); + $message_charset, 'B', "\r\n", 8); mb_internal_encoding(RCUBE_CHARSET); }