| | |
| | | $param = 'replyto'; |
| | | $header = 'reply-to'; |
| | | |
| | | case 'mailreplyto': |
| | | case 'mail-reply-to': |
| | | case 'followupto': |
| | | case 'followup-to': |
| | | if (!$fname) { |
| | | $fname = '_mailreplyto'; |
| | | $param = 'mailreplyto'; |
| | | $header = 'mail-reply-to'; |
| | | } |
| | | |
| | | case 'mailfollowupto': |
| | | case 'mail-followup-to': |
| | | if (!$fname) { |
| | | $fname = '_mailfollowupto'; |
| | | $param = 'mailfollowupto'; |
| | | $fname = '_followupto'; |
| | | $param = 'followupto'; |
| | | $header = 'mail-followup-to'; |
| | | } |
| | | |
| | |
| | | $fvalue = $MESSAGE->get_header('cc'); |
| | | else if ($header=='bcc' && !empty($MESSAGE->headers->bcc)) |
| | | $fvalue = $MESSAGE->get_header('bcc'); |
| | | else if ($header=='reply-to' && !empty($MESSAGE->headers->others['mail-reply-to'])) |
| | | $fvalue = $MESSAGE->get_header('mail-reply-to'); |
| | | else if ($header=='reply-to' && !empty($MESSAGE->headers->replyto)) |
| | | $fvalue = $MESSAGE->get_header('reply-to'); |
| | | else if ($header=='mail-reply-to' && !empty($MESSAGE->headers->others['mail-reply-to'])) |
| | | $fvalue = $MESSAGE->get_header('followup-to'); |
| | | else if ($header=='mail-followup-to' && !empty($MESSAGE->headers->others['mail-followup-to'])) |
| | | $fvalue = $MESSAGE->get_header('mail-followup-to'); |
| | | |
| | |
| | | $from_id = get_input_value('_from', RCUBE_INPUT_POST); |
| | | else if (!empty($_SESSION['compose']['param']['from'])) |
| | | $from_id = $_SESSION['compose']['param']['from']; |
| | | else if (count($user_identities) > 1) { |
| | | else { |
| | | $return_path = $MESSAGE->headers->others['return-path']; |
| | | |
| | | // Set identity |
| | |
| | | // add signatures to client |
| | | $OUTPUT->set_env('signatures', $a_signatures); |
| | | } |
| | | else |
| | | { |
| | | // no identities, display text input field |
| | | else { |
| | | $field_attrib['class'] = 'from_address'; |
| | | $input_from = new html_inputfield($field_attrib); |
| | | $out = $input_from->show($_POST['_from']); |
| | | } |
| | |
| | | $out .= $msgtype->show(); |
| | | |
| | | // If desired, set this textarea to be editable by TinyMCE |
| | | if ($isHtml) $attrib['class'] = 'mce_editor'; |
| | | $textarea = new html_textarea($attrib); |
| | | $out .= $textarea->show($MESSAGE_BODY); |
| | | if ($isHtml) { |
| | | $attrib['class'] = 'mce_editor'; |
| | | $textarea = new html_textarea($attrib); |
| | | $out .= $textarea->show($MESSAGE_BODY); |
| | | } |
| | | else { |
| | | $textarea = new html_textarea($attrib); |
| | | $out .= $textarea->show(''); |
| | | // quote plain text, inject into textarea |
| | | $table = get_html_translation_table(HTML_SPECIALCHARS); |
| | | $MESSAGE_BODY = strtr($MESSAGE_BODY, $table); |
| | | $out = substr($out, 0, -11) . $MESSAGE_BODY . '</textarea>'; |
| | | } |
| | | |
| | | $out .= $form_end ? "\n$form_end" : ''; |
| | | |
| | | $OUTPUT->set_env('composebody', $attrib['id']); |
| | |
| | | // build reply prefix |
| | | $from = array_pop($RCMAIL->imap->decode_address_list($MESSAGE->get_header('from'))); |
| | | $prefix = sprintf("On %s, %s wrote:", |
| | | $MESSAGE->headers->date, $from['name'] ? $from['name'] : idn_to_utf8($from['email'])); |
| | | $MESSAGE->headers->date, $from['name'] ? $from['name'] : idn_to_utf8($from['mailto'])); |
| | | |
| | | if (!$bodyIsHtml) { |
| | | $body = preg_replace('/\r?\n/', "\n", $body); |