No announcement yet.

Unable to manage email with Malformed UTF-8 characters

  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to manage email with Malformed UTF-8 characters

    I received an email which is impossible to read and even delete (but moving to trash os ok) , If I try I get the error message:

    Erreur 500
    Malformed UTF-8 characters, possibly incorrectly encoded​

    Thanks for any feedbacks/ideas/... how to remove this kind of emails.
    meilleures salutations,

  • #2
    Hi, Salut
    EspoCRM – Open Source CRM Application. Contribute to espocrm/espocrm development by creating an account on GitHub.

    take one job.. and modify,

    add just (choose $entityType > maybe email .. ) and ID :


    then run Jobs

    php command.php run-job JobName


    • #3
      Thanks for your help :-)


      • #4
        What collation is set for the `body` and `subject` columns in the `email` table? It should be utf8mb4_unicode_ci.


        • #5
          Could you provide such an email so we try to reproduce?


          • #6
            A quick workaround solution I found in dealing with a similar situation recently (the first and only time I have seen this in 4+ years) was to use the Formula Sandbox as admin. I could read the email, but got the same error when trying to move to trash or delete. Using the sandbox, I selected "Email" as target type, and chose the specific problem email as target. Then entered "deleted = 1" in the formula sandbox. That got rid of the problem email.


            • #7
              Attached the email (eml format)
              Attached Files


              • #8
                Any progress with this issue? I run into it pretty often - seems that there are certain senders than regularly send emails with this error - and I can't read them.

                One of them is attached.

                Diib alert may have an issue with homepage canonicalization. This could negatively impact rankings and visitor

                BTW - can read it fine from RoundCube webmail
                Attached Files
                Last edited by mdmen; 03-10-2023, 03:28 PM.


                • #9
                  Here's the fix:


                  • #10
                    Thanks but that does not work. I cannot retrieve any email at all now (500).
                    Last edited by mdmen; 03-10-2023, 10:36 PM.


                    • #11
                      What is the log?


                      • yuri
                        yuri commented
                        Editing a comment
                        It's likely you did something wrong.

                      • yuri
                        yuri commented
                        Editing a comment
                        Note that fix will work only new fetched emails.

                    • #12
                      [2023-03-10 22:51:12] ERROR: Slim Application Error Type: ParseError Code: 0 Message: syntax error, unexpected token "namespace" File: /home/mdmen/ Line: 1 Trace: #0 /home/mdmen/ Composer\Autoload\includeFile('/home/mdmen/pk....') EspoCRM Forum /home/mdmen/ Composer\Autoload\ClassLoader->loadClass('Espo\\Entities\\E...') Forum /home/mdmen/ Espo\Services\Email->getFoldersNotReadCounts() #3 /home/mdmen/ Espo\Controllers\Email->getActionGetFoldersNotReadCounts(Array, '', Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #4 /home/mdmen/ Espo\Core\Api\ActionProcessor->process('Email', 'getFoldersNotRe...', Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) Groups /home/mdmen/ Espo\Core\Api\RequestProcessor->proceed(Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) Uncategorized Groups /home/mdmen/ Espo\Core\Api\RequestProcessor->processInternal(Object(Espo\Core\Api\Route), Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) Special /home/mdmen/ Espo\Core\Api\RequestProcessor->process(Object(Espo\Core\Api\Route), Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) Visitor Messages /home/mdmen/ Espo\Core\Api\Starter->Espo\Core\Api\{closure}(Object(Slim\Psr7\Request) , Object(Slim\Psr7\Response), Array) Private Messages /home/mdmen/ Slim\Handlers\Strategies\RequestResponse->__invoke(Object(Closure), Object(Slim\Psr7\Request), Object(Slim\Psr7\Response), Array) Albums /home/mdmen/ Slim\Routing\Route->handle(Object(Slim\Psr7\Request)) #11 /home/mdmen/ Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) #12 /home/mdmen/ Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) CSS Examples /home/mdmen/ Slim\Routing\Route->run(Object(Slim\Psr7\Request)) #14 /home/mdmen/ Slim\Routing\RouteRunner->handle(Object(Slim\Psr7\Request)) General Discussion /home/mdmen/ Slim\Middleware\RoutingMiddleware->process(Object(Slim\Psr7\Request), Object(Slim\Routing\RouteRunner)) Announcements /home/mdmen/ Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Psr7\Request)) Feature Requests /home/mdmen/ Slim\Middleware\ErrorMiddleware->process(Object(Slim\Psr7\Request), Object(Psr\Http\Server\RequestHandlerInterface@ano nymous)) Installation and Upgrade Help /home/mdmen/ Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Psr7\Request)) Extensions /home/mdmen/ Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) Developer Help /home/mdmen/ Slim\App->handle(Object(Slim\Psr7\Request)) Bug Reports /home/mdmen/ Slim\App->run() Unminify assets or how to recreate t...o.min.js file? /home/mdmen/ Espo\Core\Api\Starter->start() /home/mdmen/ Espo\Core\ApplicationRunners\Api->run() #24 /home/mdmen/ Espo\Core\Application\RunnerRunner->run('Espo\\Core\\Appli...', NULL) /home/mdmen/ Espo\Core\Application->run('Espo\\Core\\Appli...') how to upgrade ? {main} Tips: To display error details in HTTP response set "displayErrorDetails" to true in the ErrorHandler constructor. [] []


                      • item
                        item commented
                        Editing a comment
                        for information :
                        what's is version? :