tedious / Fetch

An IMAP library for PHP
http://www.tedivm.com
Other
503 stars 158 forks source link

Subject not correct: =?iso-8859-7?Q?.......... #142

Closed DarkAllMan closed 9 years ago

DarkAllMan commented 9 years ago

Some of my received mails contain =?iso-8859-7?Q? in the subject. How can I resolve this?

DarkAllMan commented 9 years ago

I think the solution is: http://www.php.net/manual/en/function.imap-utf8.php#102081

So it needs to be added to the decoding of the subject and addresses decoding

Message.php Line: 230 $this->subject = isset($messageOverview->subject) ? iconv_mime_decode($messageOverview->subject,0,"UTF-8") : null;

But probably it needs to be done somewhere else....

aguzmans commented 9 years ago

I had the same issue and fixed it the same way. It worked for me. Thank you.

DarkAllMan commented 9 years ago

Sometimes the From address has the same... still need to figure out where to implement this for the from address.

aguzmans commented 9 years ago

I've used it for the subjects only. I had a list of 2 mails and 3 of them had this issue, but I just filtered everything. I do not have any issues with the addresses, maybe due to. This is what I use to get the sender:

$messages = $this->server->getMessages(); foreach ($messages as $key => $message) { $sender = $message->getAddresses('from')["address"]; . . . } Maybe you can try to filter here: $message->getAddresses('from')["address"];

tedivm commented 9 years ago

Character encoding has been updated with the current release. I'm asking that people submit new tickets for any bugs that they find.