'TYPO3: Change MAIL configuration dynamically?
In my website I have different sites. In each site, each Email record that is supposed to be sent, is stored in a specific resource storage page. Then a scheduler task sends all the emails from each of these pages (one page per site).
What I would like to do is to use different Mail settings for each of these sites. The problem is that the Mail settings are set through $GLOBALS[‘TYPO3_CONF_VARS’]. Is there a way to change those values dynamically so each of these sites have their own values for the configuration fields of, e.g.: transport_smtp_server, transport_smtp_encrypt, transport_smtp_username and defaultMailFromAddress?
I've configured these values site-specifically through TYPO3's site handling. Before sending each email, by using it's Pid, the configuration for the email record's site is fetched. Then I've tried changing the value of $GLOBALS[‘TYPO3_CONF_VARS’]['MAIL'] with the site's configuration before sending each email but it doesn't work, the default values are still used.
Do you guys know what could be done to achieve what I'm trying to do? I hope I explained it clearly.
Thanks a lot in advance
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
