Mail From_name are unreadable characters. 2.6.1

Please report bugs here!

Moderator: Thorsten

Post Reply
UTAKA
Posts: 37
Joined: Sun Jan 24, 2010 8:01 am
Location: phpmyfaq-jp.org
Contact:

Mail From_name are unreadable characters. 2.6.1

Post by 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
---------------------------------------

Thorsten
Posts: 14400
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Mail From_name are unreadable characters. 2.6.1

Post by 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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest