Ignore:
Timestamp:
Jul 29, 2010 2:50:19 AM (3 years ago)
Author:
alec
Message:
  • Mail-Mime-1.8.0
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/lib/Mail/mime.php

    r3648 r3837  
    843843        if (isset($this->_headers['From'])) { 
    844844            // Bug #11381: Illegal characters in domain ID 
    845             if (preg_match("|(@[0-9a-zA-Z\-\.]+)|", $this->_headers['From'], $matches)) { 
     845            if (preg_match('#(@[0-9a-zA-Z\-\.]+)#', $this->_headers['From'], $matches)) { 
    846846                $domainID = $matches[1]; 
    847847            } else { 
    848                 $domainID = "@localhost"; 
     848                $domainID = '@localhost'; 
    849849            } 
    850850            foreach ($this->_html_images as $i => $img) { 
    851                 $cid = $this->_html_images[$i]['cid']; 
     851                $cid = $this->_html_images[$i]['cid'];  
    852852                if (!preg_match('#'.preg_quote($domainID).'$#', $cid)) { 
    853853                    $this->_html_images[$i]['cid'] = $cid . $domainID; 
     
    996996            return $ret; 
    997997        } 
    998          
     998 
    999999        // Use saved boundary 
    10001000        if (!empty($this->_build_params['boundary'])) { 
     
    11561156        if (preg_match('/^multipart\//i', $type)) { 
    11571157            if (empty($this->_build_params['boundary'])) { 
    1158                 $this->_build_params['boundary'] = '=_' . md5(rand() . microtime());               
     1158                $this->_build_params['boundary'] = '=_' . md5(rand() . microtime()); 
    11591159            } 
    11601160 
     
    11891189    { 
    11901190        $this->_headers['From'] = $email; 
     1191    } 
     1192 
     1193    /** 
     1194     * Add an email to the To header 
     1195     * (multiple calls to this method are allowed) 
     1196     * 
     1197     * @param string $email The email direction to add 
     1198     * 
     1199     * @return void 
     1200     * @access public 
     1201     */ 
     1202    function addTo($email) 
     1203    { 
     1204        if (isset($this->_headers['To'])) { 
     1205            $this->_headers['To'] .= ", $email"; 
     1206        } else { 
     1207            $this->_headers['To'] = $email; 
     1208        } 
    11911209    } 
    11921210 
Note: See TracChangeset for help on using the changeset viewer.