Mail From_name are unreadable characters. 2.6.1

Please report bugs here!

Moderators: jason102178, Florian, JochenS, Thorsten

Mail From_name are unreadable characters. 2.6.1

Postby UTAKA » Mon Jan 25, 2010 5:30 pm

Ex.
contact.html : Email to the webmaster

"Your Name" is No encoding ..
Chinese(Japanese/Korean..Multibyte String) characters in mail_From_name are garbage characters(unreadable characters) .

/inc/Mail.php Line435

Code: Select all
        // From
        foreach($this->_from as $address => $name) {
            $this->headers['From'] = (empty($name) ? '' : $name.' ').'<'.$address.'>';
        }

To
Code: Select all
       // From
        foreach($this->_from as $address => $name) {
         if(empty($name)){
            $this->headers['From'] ='';
         }else{
            if (function_exists('mb_encode_mimeheader')) {
               $name = mb_encode_mimeheader($name);
            } else {
               $name = encode_iso88591($name);
            }
             $this->headers['From'] =  $name .' <'.$address.'>';
         }
//            $this->headers['From'] = (empty($name) ? '' : $name.' ').'<'.$address.'>';
        }
---------------------------------------
Sorry...I am not good at English.
http://www.phpmyfaq-jp.org
---------------------------------------
UTAKA
 
Posts: 37
Joined: Sun Jan 24, 2010 8:01 am
Location: phpmyfaq-jp.org

Re: Mail From_name are unreadable characters. 2.6.1

Postby Thorsten » Mon Jan 25, 2010 7:40 pm

Hi,

thanks for the hint, I fixed it my git repo.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
 
Posts: 13955
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq


Return to Bug reports

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 2 guests

cron