informasrl I did a new installation from scratch (using Installatron)

You might want to try installing yourself to rule out the 3rd party installer thing as being the problem.

I'm having this same issue - our OSTicket setup was not done via a 3rd-party installer. It ran fine for many years with upgrades via FTP - I updated the site to run PHP 8 before the most recent update and this started happening afterwards.

I'll look at installing the patches and report back - same thing though; the original ticket creator gets garbled text in our reply, and the cced person's email is malformed so they don't get a response at all.

I can't seem to find any documentation on the required PHP extensions for running the latest version of the software - can anyone point me to a list? Thanks.

I'm not aware of any changes in PHP extensions in a very long time.

If that's the case it's probably safe to say it's not an extension issue. I don't have the capacity to install the other patches via Git at this point but they don't look like they're really relevant anyway.

I did find that if we removed the cced collaborator from the ticket, then we could respond to the ticket and the ticket's creator would get a non-mangled reply.

18 days later

The software update did not help - having a collaborator on the ticket resulted in a malformed response sent to the person who submitted the ticket, and the cced person got no reply at all.

With thanks to informasrl - the workaround above seems to have done the job.

    @aloeroot @informasrl

    I cannot replicate this issue. I just tested using v1.16.2 and PHP 8.0. When I have collaborators on a ticket and I reply as an agent both the user and collaborator get valid emails.

    Cheers.

    @ordonezgs

    What are the exact steps to replicate the issue? What PHP extensions do you have installed and enabled? What do the user and collaborator names look like? What do their emails look like? How many collaborators are on the ticket? Is your Contact Information Form > Email Address field the default or was it changed? What does your Response/Reply Email Template look like?

    There are so many questions I have as I cannot replicate this.

    Cheers.

      KevinTheJedi

      KevinTheJedi What are the exact steps to replicate the issue?

      [BlueHost - Shared Hosting]
      PHP Ver (after upgrade) -> 8.0.17

      We have upgraded OsTicket from v1.14.1 to v1.16.1

      In order to replicate the issue you must create a Ticket with a owner and a collaborator (one at least).
      You will get the notification email mal formed not complying email RFC, because the Mail Headers are malformed making that the E-mail gets encoded as Email RFC is malformed it is unable to decode by the email servers.

      KevinTheJedi What PHP extensions do you have installed and enabled?

      Not sure, because I don't know how to view it on Cpanel. But at least from: OsTicketInstalation/scp/system.php.
      It shows:
      -gdlib
      -imap
      -xml
      -xml-dom
      -json
      -mbstring
      -phar
      -intl
      -fileinfo
      -zip
      -APCu
      -Zend Opcache

      As shown in the previous image.

      KevinTheJedi What do the user and collaborator names look like?

      Are english alphabet only, no special characters.

      KevinTheJedi What do their emails look like?

      Only english alphabet only, it does have a dot in this format. We use this email format = name.lastname@example.com

      KevinTheJedi Is your Contact Information Form > Email Address field the default or was it changed?

      Not sure about what are you talking about, so I will assume that is as default.

      KevinTheJedi What does your Response/Reply Email Template look like?

      We are not fetching emails, so we do not use this feature to reply.
      ///////////////////////////////////////////////////////////////////////////
      I hope this will be sufficient information. Anyway don't hesitate to ask for more information.

      We have not applied any patch as decribed previously to try to see if it resolves the issue. We don't have third party modules.

      Should we update to V.1.16.2 to see if this solves the issue?

      KevinTheJedi
      We have recently completed the update task, but unfortunately we still have the same bug.

      We at this time, have only tested with an already open ticket in previous version and answered in last version. We will let you know if this bug remains as soon as we open a new ticket.

      Thank you.

        ordonezgs

        Please export the malformed email to .eml format (required) and send it to support [at] osticket [dot] com.

        There we will review the raw email and see what's going on.

        Cheers.

        @ordonezgs

        Can you please edit your php.ini file and set mail.add_x_header to 0, restart the webserver (and PHP-FPM if you're running it), and retest the issue?

        Cheers.

          KevinTheJedi
          We have applied the indicated configuration to the php.ini file, however, the error persists. It should be noted that we had to create the file since it did not even exist, so the only configuration in the file now is the one indicated in the file.

          We even deleted the cache but the emails still appear the same, the mail arrives incorrectly not in accordance with the RFC.

            ordonezgs

            Okay so from the headers it looks like you're using PHPMailer to send mail. Typically this is when you don't configure SMTP or SMTP is failing so it falls back to PHPMailer. Is there any way you can setup SMTP instead and see if the issue persists? I'm thinking this issue is isolated to PHPMailer which is why I can't replicate it (as I'm using SMTP).

            Cheers.

              KevinTheJedi
              After a few uses with the platform, I report the following. With the inclusion of the indicated file a bug occurred, to confirm it we will remove it and we will comment on new changes.

              The bug is the following, previously we only had the problem with the mails that go to the client in case of adding collaborators, but now, the error was extended to the mail in which the Staff is informed that a new ticket was opened, arriving encoded.

              KevinTheJedi
              Sure I will create the account on our mail server and then set up the SMTP config in order to try this mailing mode.
              Will comment any changes. Thanks for the following.

              Greetings.