alecpl
2010-07-29 8fc8101c917d6857ccc5524923740f0afc990b0c
program/lib/Mail/mime.php
@@ -842,10 +842,10 @@
        if (isset($this->_headers['From'])) {
            // Bug #11381: Illegal characters in domain ID
            if (preg_match("|(@[0-9a-zA-Z\-\.]+)|", $this->_headers['From'], $matches)) {
            if (preg_match('#(@[0-9a-zA-Z\-\.]+)#', $this->_headers['From'], $matches)) {
                $domainID = $matches[1];
            } else {
                $domainID = "@localhost";
                $domainID = '@localhost';
            }
            foreach ($this->_html_images as $i => $img) {
                $cid = $this->_html_images[$i]['cid'];
@@ -1191,6 +1191,24 @@
    }
    /**
     * Add an email to the To header
     * (multiple calls to this method are allowed)
     *
     * @param string $email The email direction to add
     *
     * @return void
     * @access public
     */
    function addTo($email)
    {
        if (isset($this->_headers['To'])) {
            $this->_headers['To'] .= ", $email";
        } else {
            $this->_headers['To'] = $email;
        }
    }
    /**
     * Add an email to the Cc (carbon copy) header
     * (multiple calls to this method are allowed)
     *