Changeset a999682 in github


Ignore:
Timestamp:
Sep 29, 2010 8:56:10 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
b3660bb
Parents:
e999919
Message:
  • Add option to automatically send read notifications for known senders (1485883)
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    re999919 ra999682  
    55- Add link to identities in compose window (#1486729) 
    66- Add Internationalized Domain Name (IDNA) support (#1483894) 
     7- Add option to automatically send read notifications for known senders (1485883) 
    78 
    89RELEASE 0.4.1 
  • program/localization/en_US/labels.inc

    rd7f9eb5 ra999682  
    316316$labels['serversettings'] = 'Server Settings'; 
    317317$labels['mailboxview'] = 'Mailbox View'; 
    318 $labels['mdnrequests'] = 'Sender notifications'; 
    319 $labels['askuser'] = 'ask the user'; 
    320 $labels['autosend'] = 'send automatically'; 
     318$labels['mdnrequests'] = 'On request for return receipt'; 
     319$labels['askuser'] = 'ask me'; 
     320$labels['autosend'] = 'send receipt'; 
     321$labels['autosendknown'] = 'send receipt to my contacts only'; 
    321322$labels['ignore'] = 'ignore'; 
    322323$labels['readwhendeleted'] = 'Mark the message as read on delete'; 
     
    406407$labels['korean'] = 'Korean'; 
    407408$labels['chinese'] = 'Chinese'; 
    408                                                                                                                                                                                                                                  
     409 
    409410?> 
  • program/localization/pl_PL/labels.inc

    re019f2d ra999682  
    296296$labels['serversettings'] = 'Ustawienia serwera'; 
    297297$labels['mailboxview'] = 'Widok skrzynki pocztowej'; 
    298 $labels['mdnrequests'] = 'Potwierdzenia odbioru'; 
    299 $labels['askuser'] = 'pytaj'; 
    300 $labels['autosend'] = 'wyślij automatycznie'; 
     298$labels['mdnrequests'] = 'Na ÅŒadanie potwierdzenia odbioru'; 
     299$labels['askuser'] = 'pytaj mnie'; 
     300$labels['autosend'] = 'wyślij potwierdzenie'; 
     301$labels['autosendknown'] = 'wyślij potwierdzenie tylko do moich kontaktów'; 
    301302$labels['ignore'] = 'ignoruj'; 
    302303$labels['readwhendeleted'] = 'Podczas usuwania oznacz wiadomość jako przeczytanĠ
  • program/steps/mail/func.inc

    re999919 ra999682  
    15851585} 
    15861586 
    1587  
    1588 function rcmail_send_mdn($uid, &$smtp_error) 
     1587/** 
     1588 * Send the MDN response 
     1589 * 
     1590 * @param mixed $message    Original message object (rcube_message) or UID 
     1591 * @param array $smtp_error SMTP error array (reference) 
     1592 * 
     1593 * @return boolean Send status 
     1594 */ 
     1595function rcmail_send_mdn($message, &$smtp_error) 
    15891596{ 
    15901597  global $RCMAIL, $IMAP; 
    15911598 
    1592   $message = new rcube_message($uid); 
     1599  if (!is_a($message, rcube_message)) 
     1600    $message = new rcube_message($message); 
    15931601 
    15941602  if ($message->headers->mdn_to && !$message->headers->mdn_sent && 
  • program/steps/mail/show.inc

    r0911fac ra999682  
    7373      $mbox_name != $CONFIG['sent_mbox']) 
    7474  { 
    75     if (intval($CONFIG['mdn_requests']) === 1) 
    76     { 
    77       if (rcmail_send_mdn($MESSAGE->uid, $smtp_error)) 
     75    $mdn_cfg = intval($CONFIG['mdn_requests']); 
     76 
     77    if ($mdn_cfg == 1 || ($mdn_cfg == 3 && rcmail_contact_exists($MESSAGE->sender['mailto']))) { 
     78      // Send MDN 
     79      if (rcmail_send_mdn($MESSAGE, $smtp_error)) 
    7880        $OUTPUT->show_message('receiptsent', 'confirmation'); 
    7981      else if ($smtp_error) 
     
    8284        $OUTPUT->show_message('errorsendingreceipt', 'error'); 
    8385    } 
    84     else if (empty($CONFIG['mdn_requests'])) 
    85     { 
     86    else if ($mdn_cfg != 2) { 
     87      // Ask user 
    8688      $OUTPUT->add_label('mdnrequest'); 
    8789      $OUTPUT->set_env('mdn_request', true); 
     
    182184} 
    183185 
    184  
    185  
    186186function rcmail_remote_objects_msg($attrib) 
    187187{ 
     
    202202  $RCMAIL->output->add_gui_object('remoteobjectsmsg', $attrib['id']); 
    203203  return html::div($attrib, $msg); 
     204} 
     205 
     206function rcmail_contact_exists($email) 
     207{ 
     208  global $RCMAIL; 
     209 
     210  if ($email) { 
     211    // @TODO: search in all address books? 
     212    $CONTACTS = $RCMAIL->get_address_book(null, true); 
     213    $existing = $CONTACTS->search('email', $email, true, false); 
     214    if ($existing->count) 
     215      return true; 
     216  } 
     217 
     218  return false; 
    204219} 
    205220 
     
    229244exit; 
    230245 
    231  
  • program/steps/settings/func.inc

    re999919 ra999682  
    324324      $select_mdn_requests->add(rcube_label('askuser'), 0); 
    325325      $select_mdn_requests->add(rcube_label('autosend'), 1); 
     326      $select_mdn_requests->add(rcube_label('autosendknown'), 3); 
    326327      $select_mdn_requests->add(rcube_label('ignore'), 2); 
    327328 
Note: See TracChangeset for help on using the changeset viewer.