| | |
| | | $OUTPUT->set_env('permaurl', rcmail_url('show', array('_uid' => $MESSAGE->uid, '_mbox' => $mbox_name))); |
| | | $OUTPUT->set_env('delimiter', $RCMAIL->storage->get_hierarchy_delimiter()); |
| | | $OUTPUT->set_env('mailbox', $mbox_name); |
| | | $OUTPUT->set_env('compose_extwin', $RCMAIL->config->get('compose_extwin',false)); |
| | | |
| | | // mimetypes supported by the browser (default settings) |
| | | $mimetypes = $RCMAIL->config->get('client_mimetypes', 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,image/bmp,image/tiff,application/x-javascript,application/pdf,application/x-shockwave-flash'); |
| | | $mimetypes = is_string($mimetypes) ? explode(',', $mimetypes) : (array)$mimetypes; |
| | | $mimetypes = (array)$RCMAIL->config->get('client_mimetypes'); |
| | | |
| | | // Remove unsupported types, which makes that attachment which cannot be |
| | | // displayed in a browser will be downloaded directly without displaying an overlay page |
| | |
| | | } |
| | | } |
| | | |
| | | $OUTPUT->set_env('mimetypes', $mimetypes); |
| | | $OUTPUT->set_env('mimetypes', array_values($mimetypes)); |
| | | |
| | | if ($CONFIG['drafts_mbox']) |
| | | $OUTPUT->set_env('drafts_mailbox', $CONFIG['drafts_mbox']); |
| | |
| | | |
| | | if (!$OUTPUT->ajax_call) |
| | | $OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash', |
| | | 'movingmessage', 'deletingmessage'); |
| | | 'movingmessage', 'deletingmessage', 'markingmessage'); |
| | | |
| | | // check for unset disposition notification |
| | | if ($MESSAGE->headers->mdn_to |
| | |
| | | |
| | | if (sizeof($MESSAGE->attachments)) { |
| | | foreach ($MESSAGE->attachments as $attach_prop) { |
| | | $filename = $attach_prop->filename; |
| | | if (empty($filename) && $attach_prop->mimetype == 'text/html') { |
| | | $filename = rcube_label('htmlmessage'); |
| | | } |
| | | $filename = rcmail_attachment_name($attach_prop, true); |
| | | |
| | | if ($PRINT_MODE) { |
| | | $size = $RCMAIL->message_part_size($attach_prop); |
| | |
| | | |
| | | if ($email) { |
| | | // @TODO: search in all address books? |
| | | $CONTACTS = $RCMAIL->get_address_book(null, true); |
| | | $CONTACTS = $RCMAIL->get_address_book(-1, true); |
| | | $existing = $CONTACTS->search('email', $email, true, false); |
| | | if ($existing->count) |
| | | return true; |
| | |
| | | if ($MESSAGE->sender) |
| | | $photo_img = $RCMAIL->url(array('_task' => 'addressbook', '_action' => 'photo', '_email' => $MESSAGE->sender['mailto'], '_alt' => $placeholder)); |
| | | else |
| | | $photo_img = $placeholder ? $placeholder : 'program/blank.gif'; |
| | | $photo_img = $placeholder ? $placeholder : 'program/resources/blank.gif'; |
| | | |
| | | return html::img(array('src' => $photo_img) + $attrib); |
| | | } |