diff options
| author | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-02-19 18:34:34 +0000 |
|---|---|---|
| committer | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-02-19 18:34:34 +0000 |
| commit | 31abd72c2fa13e53a4d8070513cd0a313d2e5925 (patch) | |
| tree | 6365c81eec3ef9b81612fd8723025c4ba58d189e /roundcubemail/program/steps/mail | |
| parent | 487116d32e66d3fe7e5d4e015db9a03c03b3d1f4 (diff) | |
Applied several patches
git-svn-id: https://svn.roundcube.net/trunk@140 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail')
| -rw-r--r-- | roundcubemail/program/steps/mail/compose.inc | 3 | ||||
| -rw-r--r-- | roundcubemail/program/steps/mail/sendmail.inc | 15 |
2 files changed, 15 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/mail/compose.inc b/roundcubemail/program/steps/mail/compose.inc index 80f69b596..98e0a0a2a 100644 --- a/roundcubemail/program/steps/mail/compose.inc +++ b/roundcubemail/program/steps/mail/compose.inc @@ -59,6 +59,9 @@ if ($_GET['_reply_uid'] || $_GET['_forward_uid']) $REPLY_MESSAGE = &$MESSAGE; $_SESSION['compose']['reply_uid'] = $_GET['_reply_uid']; $_SESSION['compose']['reply_msgid'] = $REPLY_MESSAGE['headers']->messageID; + $_SESSION['compose']['reference'] = $REPLY_MESSAGE['headers']->reference; + $_SESSION['compose']['references'] .= !empty($REPLY_MESSAGE['headers']->reference) ? ' ' : ''; + $_SESSION['compose']['references'] .= $REPLY_MESSAGE['headers']->messageID; if ($_GET['_all']) $REPLY_MESSAGE['reply_all'] = 1; diff --git a/roundcubemail/program/steps/mail/sendmail.inc b/roundcubemail/program/steps/mail/sendmail.inc index 0ec19a9e4..a520a5043 100644 --- a/roundcubemail/program/steps/mail/sendmail.inc +++ b/roundcubemail/program/steps/mail/sendmail.inc @@ -123,9 +123,11 @@ if (strlen($identity_arr['organization'])) if (strlen($identity_arr['reply-to'])) $headers['Reply-To'] = $identity_arr['reply-to']; -if ($_SESSION['compose']['reply_msgid']) +if (!empty($_SESSION['compose']['reply_msgid'])) $headers['In-Reply-To'] = $_SESSION['compose']['reply_msgid']; +if (!empty($_SESSION['compose']['references'])) + $headers['References'] = $_SESSION['compose']['references']; if ($_POST['_priority']) { @@ -180,8 +182,12 @@ if (is_array($_FILES['_attachments']['tmp_name'])) $MAIL_MIME->addAttachment($filepath, $files['type'][$i], $files['name'][$i], TRUE); +// chose transfer encoding +$charset_7bit = array('ASCII', 'ISO-2022-JP', 'ISO-8859-1', 'ISO-8859-2', 'ISO-8859-15'); +$transfer_encoding = in_array(strtoupper($message_charset), $charset_7bit) ? '7bit' : '8bit'; + // encoding settings for mail composing -$message_param = array('text_encoding' => '8bit', +$message_param = array('text_encoding' => $transfer_encoding, 'html_encoding' => 'quoted-printable', 'head_encoding' => 'quoted-printable', 'head_charset' => $message_charset, @@ -190,8 +196,11 @@ $message_param = array('text_encoding' => '8bit', // compose message body and get headers $msg_body = $MAIL_MIME->get($message_param); -$msg_subject = $headers['Subject']; +$msg_subject = $headers['Subject']; +global $MBSTRING; +if ($MBSTRING&&function_exists( "mb_encode_mimeheader")) + $headers['Subject'] = mb_encode_mimeheader( $headers['Subject'],$message_charset); // send thru SMTP server using cusotm SMTP library if ($CONFIG['smtp_server']) |
