| | |
| | | $part = $MESSAGE->mime_parts[$part]; |
| | | $table = new html_table(array('cols' => 3)); |
| | | |
| | | $filename = $part->filename; |
| | | if (empty($filename) && $attach_prop->mimetype == 'text/html') { |
| | | $filename = rcube_label('htmlmessage'); |
| | | } |
| | | $filename = rcmail_attachment_name($part); |
| | | |
| | | if (!empty($filename)) { |
| | | $table->add('title', Q(rcube_label('filename'))); |
| | |
| | | |
| | | return $table->show($attrib); |
| | | } |
| | | |
| | | |
| | | |
| | | function rcmail_message_part_frame($attrib) |
| | |
| | | if ($agent = $RCMAIL->config->get('useragent')) |
| | | $headers['User-Agent'] = $agent; |
| | | |
| | | if ($RCMAIL->config->get('mdn_use_from')) |
| | | $options['mdn_use_from'] = true; |
| | | |
| | | $body = rcube_label("yourmessage") . "\r\n\r\n" . |
| | | "\t" . rcube_label("to") . ': ' . rcube_mime::decode_mime_string($message->headers->to, $message->headers->charset) . "\r\n" . |
| | | "\t" . rcube_label("subject") . ': ' . $message->subject . "\r\n" . |
| | |
| | | $compose->setTXTBody(rc_wordwrap($body, 75, "\r\n")); |
| | | $compose->addAttachment($report, 'message/disposition-notification', 'MDNPart2.txt', false, '7bit', 'inline'); |
| | | |
| | | $sent = rcmail_deliver_message($compose, $identity['email'], $mailto, $smtp_error, $body_file); |
| | | $sent = rcmail_deliver_message($compose, $identity['email'], $mailto, $smtp_error, $body_file, $options); |
| | | |
| | | if ($sent) |
| | | { |
| | |
| | | return $name; |
| | | } |
| | | |
| | | // return attachment filename, handle empty filename case |
| | | function rcmail_attachment_name($attachment, $display = false) |
| | | { |
| | | $filename = $attachment->filename; |
| | | |
| | | if ($filename === null || $filename === '') { |
| | | if ($attachment->mimetype == 'text/html') { |
| | | $filename = rcube_label('htmlmessage'); |
| | | } |
| | | else { |
| | | $ext = rcube_mime::get_mime_extensions($attachment->mimetype); |
| | | $ext = array_shift($ext); |
| | | $filename = rcube_label('messagepart') . ' ' . $attachment->mime_id; |
| | | if ($ext) { |
| | | $filename .= '.' . $ext; |
| | | } |
| | | } |
| | | } |
| | | |
| | | $filename = preg_replace('[\r\n]', '', $filename); |
| | | |
| | | // Display smart names for some known mimetypes |
| | | if ($display) { |
| | | if (preg_match('/application\/(pgp|pkcs7)-signature/i', $attachment->mimetype)) { |
| | | $filename = rcube_label('digitalsig'); |
| | | } |
| | | } |
| | | |
| | | return $filename; |
| | | } |
| | | |
| | | function rcmail_search_filter($attrib) |
| | | { |
| | | global $OUTPUT, $CONFIG; |