MailProfileResolver
readonly class \
Resolves the mail settings of a named mail profile.
Profiles are defined in $GLOBALS['TYPO3_CONF_VARS']['MAIL']['profiles'] and use the same keys as the global MAIL configuration. A profile is merged on top of the global settings, so it only needs to define the keys that differ from them.
The spool of the global settings is not inherited: spooled emails are sent through the transport of the settings they were spooled with, so a profile spools only if it configures a spool of its own, in a directory no other configuration spools into.
A profile that defines its own "transport", "transport_smtp_server" or "dsn" does not inherit "transport_smtp_username", "transport_smtp_password" and "dsn" either, so the credentials of the global server are never sent to another one.
Attributes
- #[Autoconfigure]
- $public: true
Table of Contents
Methods
- getProfileNames() : array<int, string>
- getSettings() : array
- Returns the mail settings of the given profile, merged on top of the global settings.
- hasProfile() : bool
Methods
getProfileNames()
public
getProfileNames() : array<int, string>
Return values
array<int, string>getSettings()
Returns the mail settings of the given profile, merged on top of the global settings.
public
getSettings([string|null $profileName = null ]) : array
Without a profile name, the global settings are returned unchanged.
Parameters
- $profileName : string|null = null
Tags
Return values
arrayhasProfile()
public
hasProfile(string $profileName) : bool
Parameters
- $profileName : string