From a20855e4bfc59e1e359c2bb15824d1fca137af0e Mon Sep 17 00:00:00 2001 From: stekkel Date: Thu, 3 Jul 2003 18:35:39 +0000 Subject: [PATCH] encoding/decoding fix for MDN receipts git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5205 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/read_body.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/read_body.php b/src/read_body.php index 8d807610..facd9354 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -165,7 +165,7 @@ function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) { } $rfc822_header->content_type = $content_type; $rfc822_header->to[] = $header->dnt; - $rfc822_header->subject = _("Read:") . ' ' . decodeHeader($header->subject); + $rfc822_header->subject = _("Read:") . ' ' . encodeHeader($header->subject); $reply_to = ''; @@ -202,8 +202,8 @@ function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) { $now = getLongDateString( time() ); set_my_charset(); $body = _("Your message") . "\r\n\r\n" . - "\t" . _("To:") . ' ' . decodeHeader($to) . "\r\n" . - "\t" . _("Subject:") . ' ' . decodeHeader($header->subject) . "\r\n" . + "\t" . _("To:") . ' ' . decodeHeader($to,true,false) . "\r\n" . + "\t" . _("Subject:") . ' ' . decodeHeader($header->subject,true,false) . "\r\n" . "\t" . _("Sent:") . ' ' . $senton . "\r\n" . "\r\n" . sprintf( _("Was displayed on %s"), $now ); @@ -272,10 +272,10 @@ function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) { require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php'); $deliver = new Deliver_SMTP(); global $smtpServerAddress, $smtpPort, $smtp_auth_mech, $pop_before_smtp; - if ($smtp_auth_mech == 'none') { - $user = ''; - $pass = ''; - } else { + if ($smtp_auth_mech == 'none') { + $user = ''; + $pass = ''; + } else { global $key, $onetimepad; $user = $username; $pass = OneTimePadDecrypt($key, $onetimepad); -- 2.25.1