SSilence / php-imap-client

a easy solution for simple IMAP email access in php
MIT License
268 stars 138 forks source link

mb_convert_encoding(): Illegal character encoding specified #231

Open ascendroGitHub opened 5 years ago

ascendroGitHub commented 5 years ago

Hi, Can you please help me, I think this is a bug:

Steps to reproduce:

  1. Connected via POP3/IMAP to a maibox
  2. Selected INBOX folder
  3. request: ->getMessagesByCriteria('', 50)
  4. Exception Error is catched to an email: yii\base\ErrorException Object ( [message:protected] => mb_convert_encoding(): Illegal character encoding specified [string:Exception:private] => [code:protected] => 2 [file:protected] => C:\Work\wamp64\www\workflow-assistant\vendor\ssilence\php-imap-client\ImapClient\IncomingMessage.php [line:protected] => 392 )

charset = null

https://www.screencast.com/t/n1rY50Djume

mcki0127 commented 4 years ago

Did you ever get anywhere with this? I'm having the same problem. Line 400 of IncomingMessage.php is failing:

$objNew->text = quoted_printable_decode(mb_convert_encoding( $objNew->plain, "utf-8", $objNew->plain->charset ));
JAKgit commented 3 years ago

Check following comment: https://github.com/SSilence/php-imap-client/issues/251#issuecomment-849521509

dmorenohousell commented 2 years ago

I am having the same issue:

mb_convert_encoding(): Illegal character encoding specified in IncomingMessage.php line 400

$objNew->text = quoted_printable_decode(mb_convert_encoding( $objNew->plain, "utf-8", $objNew->plain->charset ));