Created
June 16, 2020 04:59
-
-
Save josefglatz/b0b2e39170b91882e7b23303af1c0ead to your computer and use it in GitHub Desktop.
See extension: https://github.com/extcode/mail_conf_override/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!defined('TYPO3_MODE')) { | |
die ('Access denied.'); | |
} | |
// Override configuration of LocalConfiguration | |
$customChanges = [ | |
'GFX' => [ | |
'TTFdpi' => '96', | |
'colorspace' => 'RGB', | |
'gdlib_png' => '1', | |
'im' => 1, | |
'im_mask_temp_ext_gif' => 1, | |
'im_path' => '/usr/bin/', | |
'im_path_lzw' => '/usr/bin/', | |
'im_v5effects' => -1, | |
'im_version_5' => 'gm', | |
'image_processing' => 1, | |
'jpg_quality' => '80', | |
'png_truecolor' => '1', | |
], | |
// Configuration for local mailhog container (running as "mail" docker container) | |
'MAIL' => [ | |
'transport' => 'smtp', | |
'transport_smtp_encrypt' => '', | |
'transport_smtp_password' => '', | |
'transport_smtp_server' => 'mail:1025', | |
'transport_smtp_username' => '', | |
], | |
]; | |
// Override ext:mail_conf_override settings for local mailhog container | |
foreach ($GLOBALS['TYPO3_CONF_VARS']['MAIL']['overrides'] as $fromAddress => $settings) { | |
$customChanges['MAIL']['overrides'][$fromAddress]['transport_smtp_encrypt'] = ''; | |
$customChanges['MAIL']['overrides'][$fromAddress]['transport_smtp_password'] = ''; | |
$customChanges['MAIL']['overrides'][$fromAddress]['transport_smtp_server'] = 'mail:1025'; | |
$customChanges['MAIL']['overrides'][$fromAddress]['transport_smtp_username'] = ''; | |
} | |
$GLOBALS['TYPO3_CONF_VARS'] = array_replace_recursive($GLOBALS['TYPO3_CONF_VARS'], $customChanges); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment