X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fread_body.php;h=d77f5240abbbebbb50e181d73b0174f4164b6e1e;hb=44c046311a3f62a461a82d31f792f3fc4421f820;hp=b245fc4e5bcf042c7a171c28ca149d48bd607dfa;hpb=7c612fdd06ef01a509e7691e2cf373e7910f1d48;p=squirrelmail.git
diff --git a/src/read_body.php b/src/read_body.php
index b245fc4e..d77f5240 100644
--- a/src/read_body.php
+++ b/src/read_body.php
@@ -12,962 +12,776 @@
* $Id$
*/
-require_once('../src/validate.php');
-require_once('../functions/imap.php');
-require_once('../functions/mime.php');
-require_once('../functions/date.php');
-require_once('../functions/url_parser.php');
-require_once('../functions/smtp.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'include/validate.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/mime.php');
+require_once(SM_PATH . 'functions/date.php');
+require_once(SM_PATH . 'functions/url_parser.php');
+require_once(SM_PATH . 'functions/html.php');
+
/**
-* Given an IMAP message id number, this will look it up in the cached
-* and sorted msgs array and return the index. Used for finding the next
-* and previous messages.
-*
-* returns the index of the next valid message from the array
-*/
-function findNextMessage() {
- global $msort, $currentArrayIndex, $msgs, $sort, $thread_sort_messages;
+ * Given an IMAP message id number, this will look it up in the cached
+ * and sorted msgs array and return the index. Used for finding the next
+ * and previous messages.
+ *
+ * @return the index of the next valid message from the array
+ */
+function findNextMessage($passed_id) {
+ global $msort, $msgs, $sort,
+ $thread_sort_messages, $allow_server_sort,
+ $server_sort_array;
+ if (!is_array($server_sort_array)) {
+ $thread_sort_messages = 0;
+ $allow_server_sort = FALSE;
+ }
$result = -1;
- if ($thread_sort_messages == 1) {
- $sort = 0;
- }
- if ($sort == 6) {
- if ($currentArrayIndex != 1) {
- $result = $currentArrayIndex - 1;
- }
- } else {
- if (!is_array($msort)) {
- return -1;
- }
- for (reset($msort); ($key = key($msort)), (isset($key)); next($msort)) {
- if ($currentArrayIndex == $msgs[$key]['ID']) {
- next($msort);
- $key = key($msort);
- if (isset($key))
- $result = $msgs[$key]['ID'];
+ if ($thread_sort_messages || $allow_server_sort) {
+ $count = count($server_sort_array) - 1;
+ foreach($server_sort_array as $key=>$value) {
+ if ($passed_id == $value) {
+ if ($key == $count) {
break;
+ }
+ $result = $server_sort_array[$key + 1];
+ break;
}
}
- }
- return ($result);
-}
-
-/** Removes just one address from the list of addresses. */
-function RemoveAddress(&$addr_list, $addr) {
- if ($addr != '') {
- foreach (array_keys($addr_list, $addr) as $key_to_delete) {
- unset($addr_list[$key_to_delete]);
+ } else {
+ if ($sort == 6) {
+ if ($passed_id != 1) {
+ $result = $passed_id - 1;
+ }
+ } else {
+ if (is_array($msort)) {
+ for (reset($msort); ($key = key($msort)), (isset($key)); next($msort)) {
+ if ($passed_id == $msgs[$key]['ID']) {
+ next($msort);
+ $key = key($msort);
+ if (isset($key)){
+ $result = $msgs[$key]['ID'];
+ break;
+ }
+ }
+ }
+ }
}
}
+ return $result;
}
/** returns the index of the previous message from the array. */
-function findPreviousMessage() {
- global $msort, $currentArrayIndex, $sort, $msgs, $imapConnection,
- $mailbox, $data_dir, $username, $thread_sort_messages;
- if ($thread_sort_messages == 1) {
- $sort = 0;
- }
-
+function findPreviousMessage($numMessages, $passed_id) {
+ global $msort, $sort, $msgs,
+ $thread_sort_messages,
+ $allow_server_sort, $server_sort_array;
$result = -1;
-
- if ($sort == 6) {
- $numMessages = sqimap_get_num_messages($imapConnection, $mailbox);
- if ($currentArrayIndex != $numMessages) {
- $result = $currentArrayIndex + 1;
+ if (!is_array($server_sort_array)) {
+ $thread_sort_messages = 0;
+ $allow_server_sort = FALSE;
+ }
+ if ($thread_sort_messages || $allow_server_sort ) {
+ foreach($server_sort_array as $key=>$value) {
+ if ($passed_id == $value) {
+ if ($key == 0) {
+ break;
+ }
+ $result = $server_sort_array[$key - 1];
+ break;
+ }
}
} else {
- if (!is_array($msort)) {
- return -1;
- }
- for (reset($msort); ($key = key($msort)), (isset($key)); next($msort)) {
- if ($currentArrayIndex == $msgs[$key]['ID']) {
- prev($msort);
- $key = key($msort);
- if (isset($key)) {
- $result = $msgs[$key]['ID'];
- break;
+ if ($sort == 6) {
+ if ($passed_id != $numMessages) {
+ $result = $passed_id + 1;
+ }
+ } else {
+ if (is_array($msort)) {
+ for (reset($msort); ($key = key($msort)), (isset($key)); next($msort)) {
+ if ($passed_id == $msgs[$key]['ID']) {
+ prev($msort);
+ $key = key($msort);
+ if (isset($key)) {
+ //echo $msort[$key]; /* Why again were we echoing here? */
+ $result = $msgs[$key]['ID'];
+ break;
+ }
+ }
}
}
}
}
- return ($result);
+ return $result;
}
/**
-* Displays a link to a page where the message is displayed more
-* "printer friendly".
-*/
-function printer_friendly_link() {
- global $passed_id, $mailbox, $ent_num, $color,
- $pf_subtle_link,
- $javascript_on;
-
- if (strlen(trim($mailbox)) < 1) {
- $mailbox = 'INBOX';
- }
+ * Displays a link to a page where the message is displayed more
+ * "printer friendly".
+ */
+function printer_friendly_link($mailbox, $passed_id, $passed_ent_id, $color) {
+ global $javascript_on;
- $params = '?passed_ent_id=' . $ent_num .
+ $params = '?passed_ent_id=' . $passed_ent_id .
'&mailbox=' . urlencode($mailbox) .
'&passed_id=' . $passed_id;
$print_text = _("View Printable Version");
- if (!$pf_subtle_link) {
- /* The link is large, on the bottom of the header panel. */
- $result = '
' .
- '' .
- ' ' .
- ' | '."\n";
- } else {
- /* The link is subtle, below "view full header". */
- $result = " \n";
- }
-
+ $result = '';
/* Output the link. */
if ($javascript_on) {
$result .= '\n" .
- "$print_text\n";
+ '\n" .
+ "\n" .
+ "$print_text\n";
} else {
- $result .= '$print_text\n";
+ $result .= '$print_text\n";
}
-
- if (!$pf_subtle_link) {
- /* The link is large, on the bottom of the header panel. */
- $result .= ' |
' . "\n";
- }
-
- return ($result);
+ return $result;
}
-function ServerMDNSupport( $read ) {
+function ServerMDNSupport($read) {
/* escaping $ doesn't work -> \x36 */
- $ret = preg_match( '/(\x36MDNSent|\\\*)/i', $read );
- return ( $ret );
+ $ret = preg_match('/(\x36MDNSent|\\\*)/i', $read);
+ return $ret;
}
-function SendMDN ( $recipient , $sender) {
- global $imapConnection, $mailbox, $username, $attachment_dir, $SERVER_NAME,
- $version, $attachments, $identity, $data_dir, $passed_id;
+function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) {
+ global $username, $attachment_dir, $SERVER_NAME,
+ $version, $attachments, $squirrelmail_language, $default_charset,
+ $languages, $useSendmail, $domain, $sent_folder,
+ $popuser, $data_dir, $username;
- $header = sqimap_get_message_header($imapConnection, $passed_id, $mailbox);
+ $header = $message->rfc822_header;
$hashed_attachment_dir = getHashedDir($username, $attachment_dir);
- // part 1 (RFC2298)
+ $rfc822_header = new Rfc822Header();
+ $content_type = new ContentType('multipart/report');
+ $content_type->properties['report-type']='disposition-notification';
+ set_my_charset();
+ if ($default_charset) {
+ $content_type->properties['charset']=$default_charset;
+ }
+ $rfc822_header->content_type = $content_type;
+ $rfc822_header->to[] = $header->dnt;
+ $rfc822_header->subject = _("Read:") . ' ' . $header->subject;
+
+
+ $reply_to = '';
+ if (isset($identity) && $identity != 'default') {
+ $from_mail = getPref($data_dir, $username,
+ 'email_address' . $identity);
+ $full_name = getPref($data_dir, $username,
+ 'full_name' . $identity);
+ $from_addr = '"'.$full_name.'" <'.$from_mail.'>';
+ $reply_to = getPref($data_dir, $username,
+ 'reply_to' . $identity);
+ } else {
+ $from_mail = getPref($data_dir, $username, 'email_address');
+ $full_name = getPref($data_dir, $username, 'full_name');
+ $from_addr = '"'.$full_name.'" <'.$from_mail.'>';
+ $reply_to = getPref($data_dir, $username,'reply_to');
+ }
+ if (!$from_addr) {
+ $from_addr = "$popuser@$domain";
+ $from_mail = $from_addr;
+ }
+ $rfc822_header->from = $rfc822_header->parseAddress($from_addr,true);
+ if ($reply_to) {
+ $rfc822_header->reply_to = $rfc822_header->parseAddress($reply_to,true);
+ }
+
+ // part 1 (RFC2298)
$senton = getLongDateString( $header->date );
$to_array = $header->to;
$to = '';
foreach ($to_array as $line) {
- $to .= " $line ";
+ $to .= ' '.$line->getAddress();
}
-
- $subject = $header->subject;
$now = getLongDateString( time() );
-
+ set_my_charset();
$body = _("Your message") . "\r\n\r\n" .
"\t" . _("To:") . ' ' . $to . "\r\n" .
- "\t" . _("Subject:") . ' ' . $subject . "\r\n" .
+ "\t" . _("Subject:") . ' ' . $header->subject . "\r\n" .
"\t" . _("Sent:") . ' ' . $senton . "\r\n" .
"\r\n" .
sprintf( _("Was displayed on %s"), $now );
- // part2 (RFC2298)
+ $special_encoding = '';
+ if (isset($languages[$squirrelmail_language]['XTRA_CODE']) &&
+ function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) {
+ $body = $languages[$squirrelmail_language]['XTRA_CODE']('encode', $body);
+ if (strtolower($default_charset) == 'iso-2022-jp') {
+ if (mb_detect_encoding($body) == 'ASCII') {
+ $special_encoding = '8bit';
+ } else {
+ $body = mb_convert_encoding($body, 'JIS');
+ $special_encoding = '7bit';
+ }
+ }
+ }
+ $part1 = new Message();
+ $part1->setBody($body);
+ $mime_header = new MessageHeader;
+ $mime_header->type0 = 'text';
+ $mime_header->type1 = 'plain';
+ if ($special_encoding) {
+ $mime_header->encoding = $special_encoding;
+ } else {
+ $mime_header->encoding = 'us-ascii';
+ }
+ if ($default_charset) {
+ $mime_header->parameters['charset'] = $default_charset;
+ }
+ $part1->mime_header = $mime_header;
- $original_recipient = $to;
+ // part2 (RFC2298)
+ $original_recipient = $to;
$original_message_id = $header->message_id;
- $part2 = "Reporting-UA : $SERVER_NAME ; SquirrelMail (version $version) \r\n";
+ $report = "Reporting-UA : $SERVER_NAME ; SquirrelMail (version $version) \r\n";
if ($original_recipient != '') {
- $part2 .= "Original-Recipient : $original_recipient\r\n";
+ $report .= "Original-Recipient : $original_recipient\r\n";
}
$final_recipient = $sender;
- $part2 .= "Final-Recipient: rfc822; $final_recipient\r\n" .
+ $report .= "Final-Recipient: rfc822; $final_recipient\r\n" .
"Original-Message-ID : $original_message_id\r\n" .
"Disposition: manual-action/MDN-sent-manually; displayed\r\n";
-
- $localfilename = GenerateRandomString(32, 'FILE', 7);
- $full_localfilename = "$hashed_attachment_dir/$localfilename";
-
- $fp = fopen( $full_localfilename, 'w');
- fwrite ($fp, $part2);
- fclose($fp);
-
- $newAttachment = array();
- $newAttachment['localfilename'] = $localfilename;
- $newAttachment['type'] = "message/disposition-notification";
- $newAttachment['session']=-1;
- $attachments[] = $newAttachment;
- $MDN_to = trim($recipient);
- $reply_id = 0;
-
- return (SendMessage($MDN_to,'','', _("Read:") . ' ' . $subject, $body,$reply_id, True, 3, -1) );
+ $part2 = new Message();
+ $part2->setBody($report);
+ $mime_header = new MessageHeader;
+ $mime_header->type0 = 'message';
+ $mime_header->type1 = 'disposition-notification';
+ $mime_header->encoding = 'us-ascii';
+ $part2->mime_header = $mime_header;
+
+ $composeMessage = new Message();
+ $composeMessage->rfc822_header = $rfc822_header;
+ $composeMessage->addEntity($part1);
+ $composeMessage->addEntity($part2);
+
+
+ if ($useSendmail) {
+ require_once(SM_PATH . 'class/deliver/Deliver_SendMail.class.php');
+ global $sendmail_path;
+ $deliver = new Deliver_SendMail();
+ $stream = $deliver->initStream($composeMessage,$sendmail_path);
+ } else {
+ require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php');
+ $deliver = new Deliver_SMTP();
+ global $smtpServerAddress, $smtpPort, $use_authenticated_smtp, $pop_before_smtp;
+ if ($use_authenticated_smtp) {
+ global $key, $onetimepad;
+ $user = $username;
+ $pass = OneTimePadDecrypt($key, $onetimepad);
+ } else {
+ $user = '';
+ $pass = '';
+ }
+ $authPop = (isset($pop_before_smtp) && $pop_before_smtp) ? true : false;
+ $stream = $deliver->initStream($composeMessage,$domain,0,
+ $smtpServerAddress, $smtpPort, $authPop);
+ }
+ $success = false;
+ if ($stream) {
+ $length = $deliver->mail($composeMessage, $stream);
+ $success = $deliver->finalizeStream($stream);
+ }
+ if (!$success) {
+ $msg = $deliver->dlv_msg . '
Server replied: '.$deliver->dlv_ret_nr;
+ require_once(SM_PATH . 'functions/display_messages.php');
+ plain_error_message($msg, $color);
+ } else {
+ unset ($deliver);
+ if (sqimap_mailbox_exists ($imapConnection, $sent_folder)) {
+ sqimap_append ($imapConnection, $sent_folder, $length);
+ require_once(SM_PATH . 'class/deliver/Deliver_IMAP.class.php');
+ $imap_deliver = new Deliver_IMAP();
+ $imap_deliver->mail($composeMessage, $imapConnection);
+ sqimap_append_done ($imapConnection);
+ unset ($imap_deliver);
+ }
+ }
+ return $success;
}
-function ToggleMDNflag ( $set ) {
- global $imapConnection, $passed_id, $mailbox;
- sqimap_mailbox_select($imapConnection, $mailbox);
-
- $sg = $set?'+':'-';
- $cmd = 'STORE ' . $passed_id . ' ' . $sg . 'FLAGS ($MDNSent)';
+function ToggleMDNflag ($set ,$imapConnection, $mailbox, $passed_id, $uid_support) {
+ $sg = $set?'+':'-';
+ $cmd = 'STORE ' . $passed_id . ' ' . $sg . 'FLAGS ($MDNSent)';
$read = sqimap_run_command ($imapConnection, $cmd, true, $response,
- $readmessage);
+ $readmessage, $uid_support);
}
function ClearAttachments() {
- global $username, $attachments, $attachment_dir;
-
- $hashed_attachment_dir = getHashedDir($username, $attachment_dir);
-
- $rem_attachments = array();
- foreach ($attachments as $info) {
- if ($info->session == -1) {
- $attached_file = "$hashed_attachment_dir/$info[localfilename]";
- if (file_exists($attached_file)) {
- unlink($attached_file);
- }
- } else {
- $rem_attachments[] = $info;
- }
- }
- $attachments = rem_attachments;
-}
-
-function formatRecipientString($recipients, $item ) {
- global $base_uri, $passed_id, $urlMailbox, $startMessage, $show_more_cc, $echo_more, $echo_less, $show_more, $show_more_bcc, $sort;
-
- $i = 0;
- $url_string = '';
-
- if (isset ($recipients[0]) && trim($recipients[0])) {
- $string = '';
- $ary = $recipients;
-
- switch ($item) {
- case 'to':
- $show = "&show_more=1&show_more_cc=$show_more_cc&show_more_bcc=$show_more_bcc";
- $show_n = "&show_more=0&show_more_cc=$show_more_cc&show_more_bcc=$show_more_bcc";
- break;
- case 'cc':
- $show = "&show_more=$show_more&show_more_cc=1&show_more_bcc=$show_more_bcc";
- $show_n = "&show_more=$show_more&show_more_cc=0&show_more_bcc=$show_more_bcc";
- $show_more = $show_more_cc;
- break;
- case 'bcc':
- $show = "&show_more=$show_more&show_more_cc=$show_more_cc&show_more_bcc=1";
- $show_n = "&show_more=$show_more&show_more_cc=$show_more_cc&show_more_bcc=0";
- $show_more = $show_more_bcc;
- break;
- default:
- $break;
- }
-
- while ($i < count($ary)) {
- $ary[$i] = htmlspecialchars(decodeHeader($ary[$i]));
- $url_string .= $ary[$i];
- if ($string) {
- $string = "$string
$ary[$i]";
- } else {
- $string = "$ary[$i]";
- }
-
- $i++;
- if (count($ary) > 1) {
- if ($show_more == false) {
- if ($i == 1) {
- /* From a search... */
- $string .= ' ($echo_more)";
- } else {
- $string .= "sort=$sort&startMessage=$startMessage"."$show\">$echo_more)";
- }
- $i = count($ary);
- }
- } else if ($i == 1) {
- /* From a search... */
- $string .= ' ($echo_less)";
- } else {
- $string .= "sort=$sort&startMessage=$startMessage"."$show_n\">$echo_less)";
- }
- }
- }
-
- }
- }
- else {
- $string = '';
- }
- $url_string = urlencode($url_string);
- $result = array();
- $result['str'] = $string;
- $result['url_str'] = $url_string;
- return $result;
-}
-
-
-
-/*
- * Main of read_boby.php --------------------------------------------------
- */
-
-/*
- Urled vars
- ----------
- $passed_id
-*/
+ global $username, $attachments, $attachment_dir;
-if ( isset( $mailbox ) ) {
- $mailbox = urldecode( $mailbox );
-}
-$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
-$read = sqimap_mailbox_select($imapConnection, $mailbox, false, false, true);
-
-do_hook('html_top');
-
-/*
- * The following code sets necesarry stuff for the MDN thing
- */
-if( $default_use_mdn &&
- ( $mdn_user_support = getPref($data_dir, $username, 'mdn_user_support', $default_use_mdn) ) ) {
+ $hashed_attachment_dir = getHashedDir($username, $attachment_dir);
- $supportMDN = ServerMDNSupport($read["PERMANENTFLAGS"]);
- $flags = sqimap_get_flags ($imapConnection, $passed_id);
- $FirstTimeSee = !(in_array( 'Seen', $flags ));
+ $rem_attachments = array();
+ foreach ($attachments as $info) {
+ if ($info['session'] == -1) {
+ $attached_file = "$hashed_attachment_dir/$info[localfilename]";
+ if (file_exists($attached_file)) {
+ unlink($attached_file);
+ }
+ } else {
+ $rem_attachments[] = $info;
+ }
+ }
+ $attachments = $rem_attachments;
}
-displayPageHeader($color, $mailbox);
+function formatRecipientString($recipients, $item ) {
+ global $show_more_cc, $show_more, $show_more_bcc,
+ $PHP_SELF;
+ $string = '';
+ if ((is_array($recipients)) && (isset($recipients[0]))) {
+ $show = false;
-/*
- * The following code shows the header of the message and then exit
- */
-if (isset($view_hdr)) {
- $read = sqimap_run_command ($imapConnection, "FETCH $passed_id BODY[HEADER]", true, $a, $b);
+ if ($item == 'to') {
+ if ($show_more) {
+ $show = true;
+ $url = set_url_var($PHP_SELF, 'show_more',0);
+ } else {
+ $url = set_url_var($PHP_SELF, 'show_more',1);
+ }
+ } else if ($item == 'cc') {
+ if ($show_more_cc) {
+ $show = true;
+ $url = set_url_var($PHP_SELF, 'show_more_cc',0);
+ } else {
+ $url = set_url_var($PHP_SELF, 'show_more_cc',1);
+ }
+ } else if ($item == 'bcc') {
+ if ($show_more_bcc) {
+ $show = true;
+ $url = set_url_var($PHP_SELF, 'show_more_bcc',0);
+ } else {
+ $url = set_url_var($PHP_SELF, 'show_more_bcc',1);
+ }
+ }
- echo '
' .
- '\n" .
- "\n" .
- '';
-
- $cnum = 0;
- for ($i=1; $i < count($read); $i++) {
- $line = htmlspecialchars($read[$i]);
- if (eregi("^>", $line)) {
- $second[$i] = $line;
- $first[$i] = ' ';
- $cnum++;
- } else if (eregi("^[ |\t]", $line)) {
- $second[$i] = $line;
- $first[$i] = '';
- } else if (eregi("^([^:]+):(.+)", $line, $regs)) {
- $first[$i] = $regs[1] . ':';
- $second[$i] = $regs[2];
- $cnum++;
- } else {
- $second[$i] = trim($line);
- $first[$i] = '';
+ $cnt = count($recipients);
+ foreach($recipients as $r) {
+ $add = htmlspecialchars($r->getAddress());
+ if ($string) {
+ $string .= ' ' . $add;
+ } else {
+ $string = $add;
+ if ($cnt > 1) {
+ $string .= ' ('._("less").')';
+ } else {
+ $string .= '">'._("more").')';
+ break;
+ }
+ }
+ }
}
}
- for ($i=0; $i < count($second); $i = $j) {
- if (isset($first[$i])) {
- $f = $first[$i];
- }
- if (isset($second[$i])) {
- $s = nl2br($second[$i]);
+ return $string;
+}
+
+function formatEnvheader($mailbox, $passed_id, $passed_ent_id, $message,
+ $color, $FirstTimeSee) {
+ global $msn_user_support, $default_use_mdn, $draft_folder, $sent_folder,
+ $default_use_priority, $show_xmailer_default,
+ $mdn_user_support, $PHP_SELF, $javascript_on;
+
+ $header = $message->rfc822_header;
+ $env = array();
+ $env[_("Subject")] = htmlspecialchars(decodeHeader($header->subject));
+ $from_name = $header->getAddr_s('from');
+ if (!$from_name) {
+ $from_name = $header->getAddr_s('sender');
+ if (!$from_name) {
+ $from_name = _("Unknown sender");
}
- $j = $i + 1;
- while (($first[$j] == '') && ($j < count($first))) {
- $s .= ' ' . nl2br($second[$j]);
- $j++;
- }
- parseEmail($s);
- if (isset($f)) {
- echo "$f$s";
+ }
+ $env[_("From")] = htmlspecialchars(decodeHeader($from_name));
+ $env[_("Date")] = getLongDateString($header->date);
+ $env[_("To")] = formatRecipientString($header->to, "to");
+ $env[_("Cc")] = formatRecipientString($header->cc, "cc");
+ $env[_("Bcc")] = formatRecipientString($header->bcc, "bcc");
+ if ($default_use_priority) {
+ $env[_("Priority")] = getPriorityStr($header->priority);
+ }
+ if ($show_xmailer_default) {
+ $env[_("Mailer")] = decodeHeader($header->xmailer);
+ }
+ if ($default_use_mdn) {
+ if ($mdn_user_support) {
+ if ($header->dnt) {
+ if ($message->is_mdnsent) {
+ $env[_("Read receipt")] = _("send");
+ } else {
+ $env[_("Read receipt")] = _("requested");
+ if (!($mailbox == $draft_folder ||
+ $mailbox == $sent_folder ||
+ $message->is_deleted ||
+ $passed_ent_id)) {
+ $mdn_url = $PHP_SELF . '&sendreceipt=1';
+ if ($FirstTimeSee && $javascript_on) {
+ $script = ''. "\n";
+ echo $script;
+ }
+ $env[_("Read receipt")] .= ' [' .
+ _("Send read receipt now") . ']';
+ }
+ }
+ }
}
}
- echo " |
\n" .
- '