Current time: 05-24-2012, 09:29 AM Hello There, Guest! (LoginRegister)


 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] UTF-8 in FROM mail header problem
08-30-2008, 04:47 PM
Post: #1
[F] UTF-8 in FROM mail header problem
I don't know why this problem happened or any other ppls have same problem or not.
First of all I'm using a SMTP mail function in localhost.
My forum name is in persian and so it should send a utf-8 encoded header in from header. at the moment I'm using 1.4.1 and it send mails with headers like this:
From: "=?utf-8?B?2q/Ystin2LHZhyI=?= <No-Reply@xxx.com>
I thought that it is in result of quotation that not ended. so I reported this thread and I added a quotation at the end.
after that mail never delivers!
I checked out my mails that correctly delivered to me with a persian title in from section and they was like this:
From: =?UTF-8?B?2LnZhNuMINio2KfZhdix2KfZhQ==?= <blab@blab.com>
and logged headers of smtp mail connection:
Code:
HELO localhostMAIL FROM:<=?utf-8?B?2q/Ystin2LHZhyI=?= <No-Reply@xxx.com>>RCPT TO:<mymail@gmail.com>DATADate: Sat, 30 Aug 2008 16:13:47 +0000To: mymail@gmail.comSubject: =?utf-8?B?2LHZhdiyINmI2LHZiNivINm+2KfaqSDYtNivINiv2LEg2q/Ystin2LHZhw==?=From: =?utf-8?B?2q/Ystin2LHZhyI=?= <No-Reply@xxx.com>
Return-Path: No-Reply@xxx.com
Reply-To: No-Reply@xxx.com
Message-ID: <f460d48683bcc45ba842c16efcbb8702@xxx.com>
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: MyBB
X-MyBB-Script: xxx.com/member.php
MIME-Version: 1.0
a slight comparison shows where the problem is:
FROM:<=?utf-8?B?2q/Ystin2LHZhyI=?= <No-Reply@xxx.com>>
so I believe that inc/mailhandlers/smtp.php {line~193} should be altered to:
if(!$this->send_data('MAIL FROM:'.$this->from.'', '250'))

I don't know that if this affect any other sections of mailing of board but I did it and I get result.
and also inc/class_mailhandler.php
should be altered same as this:
$this->from = $this->utf8_encode($mybb->settings['bbname']);
because utf-8 encoding does not need that indeed!
thanks.

[Image: header.jpg]
ُPersian MyBBoard , Translations, Plugins , Mods, Themes, Templates,...
Visit this user's website Find all posts by this user
08-30-2008, 05:04 PM
Post: #2
RE: UTF-8 in FROM mail header problem
That's not the correct fix, but I've already fixed this.
Visit this user's website Find all posts by this user
08-30-2008, 05:04 PM
Post: #3
[F] UTF-8 in FROM mail header problem
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.
Visit this user's website Find all posts by this user
08-30-2008, 05:06 PM
Post: #4
RE: [F] UTF-8 in FROM mail header problem
may you provide me correct fix?

[Image: header.jpg]
ُPersian MyBBoard , Translations, Plugins , Mods, Themes, Templates,...
Visit this user's website Find all posts by this user
09-01-2008, 04:33 AM
Post: #5
RE: [F] UTF-8 in FROM mail header problem
(08-30-2008 05:06 PM)imei Wrote:  may you provide me correct fix?

Me too
Find all posts by this user
09-07-2008, 02:53 PM (This post was last modified: 09-07-2008 02:55 PM by Choli.)
Post: #6
RE: [F] UTF-8 in FROM mail header problem
(08-30-2008 05:06 PM)imei Wrote:  may you provide me correct fix?

I've had the same bug and fixed it before noticing this thread. Until the new version of MyBB is released, you can use this fix (which I assume it is the one Ryan implemented):

In the file inc/class_mailhandler.php, find this line:
PHP Code:
$this->from '"'.$this->utf8_encode($mybb->settings['bbname'].'"'); 
and replace it by
PHP Code:
$this->from '"'.$this->utf8_encode($mybb->settings['bbname']).'"'

[Image: choli_av.php]
Find all posts by this user


Forum Jump:


User(s) browsing this thread: 2 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication