Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Ready for review Breaking

95027[!!!][FEATURE] Allow a mail profile per site

Benni Mack CR 0 V 0 Hard +252 −16 updated 11/14/26, 10:59

Commit message

Multi-site installations commonly need to send emails of a site
through the mail provider of that very site, which so far could only
be achieved by switching the global MAIL configuration depending on
the requested host. That does not work in the backend or on the
command line and affects all sites of the installation at once.

The new site setting "email.transportProfile" references one of the
named mail profiles, so each site can use its own SMTP server, sender
address or spool.

MailerFactory resolves the profile of a site with getMailerForSite()
and getMailerForRequest(). Both fall back to the globally configured
mailer when the site does not reference a profile, or when there is
no site at all. The frontend password recovery of EXT:felogin and the
email finisher of EXT:form now resolve their mailer from the request.

A site referencing a profile that does not exist is treated like a
site without a profile and logs a warning, so that a renamed profile
does not stop a site from sending emails.

The constructor of the EmailFinisher of EXT:form now receives the
MailerFactory instead of the MailerInterface.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 2
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/27/95027/2 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/27/95027/2 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Relation chain 2

  1. 95027 [!!!][FEATURE] Allow a mail profile per site This change

  2. main 95026[FEATURE] Add named mail profiles This change is based on it Merged Benni Mack CR +2 V +2 Expert +1139 −59

    The chain has patch set 2 of 6, the changes above it need a rebase.

Issues 2

Files 12

Review log 57

  1. Benni Mack uploaded patch set 1 07/30/26, 20:12

  2. core-ci voted on patch set 1 V +1 07/30/26, 20:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105713

  3. Oliver Klee voted on patch set 1 V +1 08/02/26, 08:53

  4. Radostin Milenov commented on patch set 1 09/14/26, 05:08

    I do have a queston to ask. Would it be beyong reason to actually let the mailer fail gracefully if there isn't a config for one speicifc site? Atleast in the form of a feature toggle for example. I could imagine in some cases it might actually be preffered to sending the mail from the wrong address.
  5. Benni Mack uploaded patch set 2 V +1 11/13/26, 18:01

  6. Benni Mack commented on patch set 2 11/13/26, 18:04

    Reply

    The fallback is deliberate, so a renamed profile doesn't break a site's emails. A strict mode could be a follow-up.
  7. core-ci voted on patch set 2 V +1 11/13/26, 19:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114367