Changeset 2717 in subversion


Ignore:
Timestamp:
Jul 7, 2009 4:36:42 AM (4 years ago)
Author:
alec
Message:
  • Support %h variable in 'smtp_server' option (#1485766)
Location:
trunk/roundcubemail
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r2713 r2717  
    22=========================== 
    33 
     4- Support %h variable in 'smtp_server' option (#1485766) 
    45- Show SMTP errors in browser (#1485927) 
    56- Allow WBR tag in HTML message (#1485960) 
  • trunk/roundcubemail/config/main.inc.php.dist

    r2696 r2717  
    9999// to use SSL connection, set ssl://smtp.host.com 
    100100// if left blank, the PHP mail() function is used 
     101// Use %h variable as replacement for user's IMAP hostname 
    101102$rcmail_config['smtp_server'] = ''; 
    102103 
  • trunk/roundcubemail/program/include/rcube_smtp.inc

    r2713 r2717  
    6565 
    6666  $smtp_timeout = null; 
    67   $smtp_host = $CONFIG['smtp_server']; 
     67  $smtp_host = str_replace('%h', $_SESSION['imap_host'], $CONFIG['smtp_server']); 
    6868  $smtp_port = is_numeric($CONFIG['smtp_port']) ? $CONFIG['smtp_port'] : 25; 
    69   $smtp_host_url = parse_url($CONFIG['smtp_server']); 
    70    
     69  $smtp_host_url = parse_url($smtp_host); 
     70 
    7171  // overwrite port 
    7272  if (isset($smtp_host_url['host']) && isset($smtp_host_url['port'])) 
  • trunk/roundcubemail/program/lib/imap.inc

    r2671 r2717  
    261261 
    262262                $line = $a[1][0] . '"' . ($escape ? iil_Escape($out) : $out) . '"'; 
    263 //              console('[...] '. $out); 
    264263        } 
    265264        return $line; 
     
    270269        $len  = 0; 
    271270        do { 
    272                 $data .= fread($fp, $bytes-$len); 
     271                $d = fread($fp, $bytes-$len); 
     272                $data .= $d; 
    273273                if ($len == strlen($data)) { 
    274274                        break; //nothing was read -> exit to avoid apache lockups 
    275275                } 
     276//              console('[...] '. $d); 
    276277                $len = strlen($data); 
    277278        } while ($len < $bytes); 
Note: See TracChangeset for help on using the changeset viewer.