- Timestamp:
- 07/26/12 11:49:17 (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r6877 r6882 1355 1355 $reply_to = $header->reply_to; 1356 1356 $return['reply_to'] = ""; 1357 1357 1358 if (is_object($reply_to[0])) 1358 1359 { 1359 1360 if ($return['from']['email'] != ($reply_to[0]->mailbox."@".$reply_to[0]->host)) 1360 1361 { 1361 if (!empty($reply_to[0]->personal))1362 foreach ($reply_to as $tmp_reply_to) 1362 1363 { 1363 $personal_reply_to = $this->formatMailObject($tmp_reply_to); 1364 if(!empty($personal_reply_to[0]->text)) { 1365 $return['reply_to'] .= '"' . $personal_reply_to['name']. '"'; 1364 if (!empty($tmp_reply_to->personal)) 1365 { 1366 $personal_tmp_reply_to = $this->formatMailObject($tmp_reply_to); 1367 $return['reply_to'] .= '"' . $personal_tmp_reply_to['name'] . '"'; 1366 1368 $return['reply_to'] .= " "; 1367 1369 $return['reply_to'] .= "<"; 1368 $return['reply_to'] .= $personal_ reply_to['email'];1370 $return['reply_to'] .= $personal_tmp_reply_to['email']; 1369 1371 $return['reply_to'] .= ">"; 1372 $return['reply_to'] .= ", "; 1370 1373 } 1371 else { 1372 $return['reply_to'] .= $reply_to[0]->mailbox . "@" . $reply_to[0]->host; 1374 else 1375 { 1376 if (isset($tmp_reply_to->host) && $tmp_reply_to->host != 'unspecified-domain') 1377 $return['reply_to'] .= $tmp_reply_to->mailbox . "@" . $tmp_reply_to->host; 1378 else 1379 $return['reply_to'] .= $tmp_reply_to->mailbox; 1380 $return['reply_to'] .= ", "; 1373 1381 } 1374 1382 } 1375 else 1376 { 1377 $return['reply_to'] .= $reply_to[0]->mailbox . "@" . $reply_to[0]->host; 1378 } 1379 } 1380 } 1381 $return['reply_to'] = $this->decode_string($return['reply_to']); 1383 $return['reply_to'] = $this->del_last_two_caracters($return['reply_to']); 1384 } 1385 } 1386 else 1387 { 1388 $return['reply_to'] = ""; 1389 } 1390 1382 1391 $return['subject'] = ( isset($header->subject) && trim($header->subject) !== '' ) ? self::decodeMimeString($header->subject) : $this->functions->getLang('(no subject) '); 1383 1392 … … 1398 1407 } 1399 1408 $return['alarm'] = $alarm; 1400 1409 1401 1410 return $return; 1402 1411 } … … 2593 2602 $ccoaddress = preg_replace('/\s+>/', '>', $ccoaddress); 2594 2603 2595 $replytoaddress = $params['input_reply to'];2604 $replytoaddress = $params['input_reply_to']; 2596 2605 $subject = $params['input_subject']; 2597 2606 $return_receipt = $params['input_return_receipt']; … … 2778 2787 else 2779 2788 $mailService->setFrom('"' . $_SESSION['phpgw_info']['expressomail']['user']['firstname'] . ' ' . $_SESSION['phpgw_info']['expressomail']['user']['lastname'] . '" <' . $_SESSION['phpgw_info']['expressomail']['user']['email'] . '>'); 2789 2790 $mailService->addHeaderField('Reply-To', $replytoaddress); 2780 2791 2781 2792 $bol = $this->add_recipients('to', $toaddress, $mailService); -
trunk/expressoMail1_2/js/draw_api.js
r6861 r6882 2813 2813 reply_to_values.type = "HIDDEN"; 2814 2814 reply_to_values.value = info_msg.reply_to; //Veio do IMAP, sem images nem links. 2815 reply_to.innerHTML = draw_plugin_cc(ID, info_msg.reply_to); 2815 $.each(break_comma(info_msg.reply_to), function(index, value){ 2816 reply_to.innerHTML += draw_plugin_cc(ID, value); 2817 }) 2816 2818 reply_to.className = "header_message_field"; 2817 2819 tr11.appendChild(td11); … … 2887 2889 cc_values.value = info_msg.cc; 2888 2890 2889 ccaddress_array[ID] = info_msg.cc.split(",");2891 ccaddress_array[ID] = break_comma(info_msg.cc); 2890 2892 if (ccaddress_array[ID].length > 1){ 2891 2893 var div_ccaddress = document.createElement("SPAN"); … … 3367 3369 //window.setTimeout(function() { $("#div_message_scroll_"+ID).focus() },250); 3368 3370 3369 /*3370 * @AUTHOR Marcos Luiz Wilhelm3371 * @DATE 2012/07/173372 * @BRIEF Break out emails only with comma out of quote marks3373 */3374 function break_comma (originalText){3375 var quotesMarks = false;3376 var completeString = "";3377 var brokenEmails = new Array();3378 originalText+=",";3379 for(i=0; i<originalText.length; i++){3380 var character = originalText.substr(i,1);3381 if(character == "\""){3382 quotesMarks = !quotesMarks;3383 }3384 if(!quotesMarks){3385 if(character == ","){3386 brokenEmails.push(completeString);3387 completeString = "";3388 }3389 else3390 completeString+=character;3391 }3392 else3393 completeString+=character;3394 }3395 return brokenEmails;3396 }3397 3398 3371 function mailto( link ) 3399 3372 { … … 4345 4318 change_text($(this).find(".ui-button-text"), get_lang("Add CC"), get_lang('Remove CC')); 4346 4319 }) 4320 //Botão Responder a 4321 .end().filter(".reply-to-button").click(function(){ 4322 show_hide(content.find(".reply-to-tr"), $(this)); 4323 }); 4347 4324 4348 4325 //BOTAO ENVIAR -
trunk/expressoMail1_2/js/main.js
r6863 r6882 1819 1819 if (document.getElementById("body_" + border_ID)) 1820 1820 data.body = document.getElementById("body_" + border_ID).innerHTML; 1821 if (document.getElementById("from_values_" + border_ID)) 1822 data.from = document.getElementById("from_values_"+border_ID).value; 1821 1823 if (Element('date_' + border_ID)){ 1822 1824 data.date = Element('date_' + border_ID).innerHTML; … … 1842 1844 var content = $("#content_id_"+new_border_ID); 1843 1845 1844 1845 1846 switch(type){ 1846 1847 case "reply_without_history": … … 1861 1862 break; 1862 1863 case "reply_with_history": 1863 1864 1864 RichTextEditor.replyController = true; //Seta o editor como modo reply 1865 1865 title = "Re: " + html_entities(data.subject); … … 1868 1868 1869 1869 draw_reply_boxes_by_field("to", data.to, content); 1870 1871 1870 content.find('[name="msg_reply_from"]').val($("#msg_number_" + border_ID).val()); 1872 1873 block_quoted_body = make_body_reply(data.body, data.to, data.date_day, data.date_hour); 1871 block_quoted_body = make_body_reply(data.body, data.from, data.date_day, data.date_hour); 1874 1872 1875 1873 useOriginalAttachments(new_border_ID,border_ID); … … 1971 1969 content.find(".subject").val("Re: " + data.subject); 1972 1970 1973 block_quoted_body = make_body_reply(data.body, data. to, data.date_day, data.date_hour);1971 block_quoted_body = make_body_reply(data.body, data.from, data.date_day, data.date_hour); 1974 1972 1975 1973 useOriginalAttachments(new_border_ID,border_ID); … … 2111 2109 //DESENHA OS RETANGULOS PARA OS E-MAIL NA OPÇÃO REPLY 2112 2110 function draw_reply_boxes_by_field(field, value, context){ 2113 array = value.split(",");2111 array = break_comma(value); 2114 2112 $.each(array, function(index, value){ 2115 2113 draw_email_box(value, context.find("."+field).filter("input")); … … 2708 2706 //stringEmail = content.find('[name="input_to"]').val(); 2709 2707 2708 var stringReply = ""; 2709 var array = content.find(".reply-to-tr").find(".box"); 2710 $.each(array, function(index, value){ 2711 stringReply += $(value).find("input").val() + ","; 2712 }); 2713 content.find('[name="input_reply_to"]').val(stringReply); 2714 2710 2715 var stringEmail = ""; 2711 2716 var stringToEmail = ""; … … 2845 2850 /////////////////////////////////////////// 2846 2851 var content = $("#content_id_"+border_id); 2852 2853 2854 var array = content.find(".reply-to-tr").find(".box"); 2855 var stringReplyToEmail = ""; 2856 $.each(array, function(index, value){ 2857 stringReplyToEmail += $(value).find("input").val() + ","; 2858 }); 2859 content.find('[name="input_reply_to"]').val(stringReplyToEmail); 2847 2860 2848 2861 var stringEmail = ""; … … 4296 4309 } 4297 4310 4311 /* 4312 * @author Marcos Luiz Wilhelm (marcoswilhelm@gmail.com) 4313 * @date 2012/07/17 4314 * @brief Break out emails only with comma out of quote marks 4315 */ 4316 function break_comma (originalText){ 4317 var quotesMarks = false; 4318 var completeString = ""; 4319 var brokenEmails = new Array(); 4320 originalText+=","; 4321 for(i=0; i<originalText.length; i++){ 4322 var character = originalText.substr(i,1); 4323 if(character == "\""){ 4324 quotesMarks = !quotesMarks; 4325 } 4326 if(!quotesMarks){ 4327 if(character == ","){ 4328 brokenEmails.push(completeString); 4329 completeString = ""; 4330 } 4331 else 4332 completeString+=character; 4333 } 4334 else 4335 completeString+=character; 4336 } 4337 return brokenEmails; 4338 } 4339 4298 4340 DataLayer.links('message'); 4299 4341 DataLayer.poll('message',30); -
trunk/prototype/modules/mail/templates/new_message.ejs
r6650 r6882 38 38 } 39 39 %> 40 <button class="button small reply-to-button"><%= get_lang("Reply to") %></button> 40 41 <button class="button small rich-button"><%= (preferences.plain_text_editor == 1 ? get_lang("Rich Text") : get_lang("Simple Text")) %></button> 41 42 </div> … … 93 94 </td> 94 95 </tr> 96 <tr class="reply-to-tr" style="display:none;"> 97 <td class="field" style="width: 6%;"> 98 <%= get_lang("Reply to") %>: 99 </td> 100 <td class="value" style="width: 100%;"> 101 <div class="email-area ui-corner-all"> 102 <input class="new-message-input reply-to email-text" name="input_aux_reply_to" type="text" value="" autocomplete="off"/> 103 </div> 104 <textarea class="new-message-input reply-to" name="input_reply_to" style="width:99%; resize: none;display : none;"></textarea> 105 </td> 106 </tr> 95 107 <tr class="subject-tr"> 96 108 <td class="field"> -
trunk/prototype/services/ImapServiceAdapter.php
r6700 r6882 603 603 */ 604 604 $mailService->addHeaderField('Message-Id', UUID::generate( UUID::UUID_RANDOM, UUID::FMT_STRING ) . '@Draft'); 605 605 $mailService->addHeaderField('Reply-To', mb_convert_encoding(($data['input_reply_to']), 'ISO-8859-1', 'UTF-8,ISO-8859-1')); 606 606 $mailService->addTo(mb_convert_encoding(($data['input_to']), 'ISO-8859-1', 'UTF-8,ISO-8859-1')); 607 607 $mailService->addCc( mb_convert_encoding(($data['input_cc']), 'ISO-8859-1', 'UTF-8,ISO-8859-1'));
Note: See TracChangeset
for help on using the changeset viewer.