Special signs in Emails

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jacobite
    Junior Member
    • Dec 2014
    • 22

    Special signs in Emails

    greetings,

    we have a problem with the email importer.

    emails with special characters... in germany eg ö, ä, ü, ß etc get cut in the email text.

    UPDATE:
    this may be a hint... the e-mails had the following charset
    Code:
    Content-type: text/plain; charset=ISO-8859-1
    Last edited by Jacobite; 12-17-2014, 08:21 AM.
  • Jacobite
    Junior Member
    • Dec 2014
    • 22

    #2
    Made another test and send an email with google mail and utf8 charset... there was no problem after importing the email

    Comment

    • Jacobite
      Junior Member
      • Dec 2014
      • 22

      #3
      possible solution

      I changed the order of the functions in the Importer.php and now a test-email with ISO-8859 charset was correctly imported with espo 2.9.2
      PHP Code:
      if (isset($part->contentTransferEncoding)) {
          $cteHeader = $part->getHeader('Content-Transfer-Encoding');
          if ($cteHeader->getTransferEncoding() == 'quoted-printable') {
              $content = quoted_printable_decode($content);
          }
      }
      
      if ($charset !== 'UTF-8') {
          $content = mb_convert_encoding($content, 'UTF-8', $charset);
      } 
      
      Last edited by Jacobite; 02-03-2015, 09:16 AM.

      Comment

      • yuri
        Member
        • Mar 2014
        • 8501

        #4
        Cool. Thank you. I will look.

        This issue on github: https://github.com/espocrm/espocrm/issues/36
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • yuri
          Member
          • Mar 2014
          • 8501

          #5
          Hi Jacobite

          Does your fix work w/o problems? I want to add your fix but need to make sure all is ok.

          Thanks
          If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

          Comment

          • Jacobite
            Junior Member
            • Dec 2014
            • 22

            #6
            the most mails are now imported completly.

            but at recent test we had 2 problems:
            1) latest mails from a co-worker are only imported without mailbody.
            his emails are iso charset and multipart with text and html. in the databse the entry has ishtml = 0
            i'm not shure where the problem is... when i write the same mail there is no problem. (text only) also this morning he had no problem too.

            2) furthermore there was a problem with an txt attachement. the importer set the txt attachement as mailbody and drop the txt file

            btw
            today we brought the advanced pack to support your work. keep on!
            Last edited by Jacobite; 02-05-2015, 12:58 PM.

            Comment

            • yuri
              Member
              • Mar 2014
              • 8501

              #7
              Thank you!

              Item 2 is fixed in https://github.com/espocrm/espocrm/c...b54571638386c0

              Regarding Item 1 i'm not sure. Maybe this commit will solve the problem.
              If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

              Comment

              • Jacobite
                Junior Member
                • Dec 2014
                • 22

                #8
                problem 2 is fixed with the submit... problem 1 unfortunately not.

                maybe i could send you the mail sourcecode for analyze or send the mail to a address from your development environment?
                when i forwoard the email from googlemail or send the same text with my business email there is no problem.
                Last edited by Jacobite; 02-06-2015, 11:57 AM.

                Comment

                Working...