Review main Merged

77934[BUGFIX] Only set X-Mailer header once

Thomas Hohn CR +2 V +2 Easy +4 −1 updated 02/23/23, 13:26

Commit message

Only set X-Mailer header if not already set.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Markus Klein +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Markus Klein +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1012

  1. Thomas Hohn uploaded patch set 1 02/23/23, 09:39

  2. core-ci voted on patch set 1 V +1 02/23/23, 09:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37996

  3. Stefan Bürk commented on patch set 1 V +1 CR +1 02/23/23, 11:35

    Not sure if reusing a message instance is a good thing, as described in the issue. However, having dupplicated headers should be avoided at all. That may happen if someone wants a custom x-mailer header set anyway. Therefore, taking this as "valid" fix.
  4. Markus Klein commented on patch set 1 02/23/23, 11:50

    Reply

    We do indeed re-use messages sometimes, if the exact same message needs to go to independent recipients.
  5. Markus Klein commented on patch set 2 CR +1 V +1 02/23/23, 11:51

    Published edit on patch set 1.
  6. Markus Klein voted on patch set 2 V +1 CR +1 02/23/23, 11:51

  7. core-ci voted on patch set 2 V +1 02/23/23, 11:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38012

  8. Ralph Brugger commented on patch set 2 02/23/23, 12:32

    Reply

    In our context, we send a daily newsletter to 50,000 to 60,000 people, and due to workflows, the task should not take longer than 3 hours. Performance optimizations are particularly important here. That's also why I wrote: $headers = $message->getHeaders(); if (! $headers->has('X-Mailer')){ $headers->addTextHeader('X-Mailer', $this->mailerHeader); } And not if (! $message->getHeaders()->has('X-Mailer')){ $message->getHeaders()->addTextHeader('X-Mailer', $this->mailerHeader); } But that shouldn't make such a big difference
  9. Thomas Hohn commented on patch set 2 02/23/23, 13:11

    Reply

    If it takes "longer" time I'm open to change it to your suggestion :-)
  10. Stefan Bürk commented on patch set 2 02/23/23, 13:26

    Reply

    @Ralph Brugger If that kind of optimatzion would made a sensable different you have other issues than that anyway.
  11. Stefan Bürk voted on patch set 2 V +2 CR +2 02/23/23, 13:26

  12. Stefan Bürk merged patch set 3 02/23/23, 13:26