In the settings.php for my local environment, I am overriding the SMTP settings to ensure that it is "on" by default:
$config['smtp.settings']['smtp_on'] = TRUE;
I also have the system mail set to "SMTPMailSystem" by default. However, if I got to the SMTP configuration page and save the settings, then the system resets my mail interface to "php_mail". The reason why is that the code in the submit handler for the form is checking the value of "smtp_on" from the editable config, not the overridden config. So it treats SMTP as disabled and thus resets my system mail to php_mail.
Comments
Comment #2
mrkdboyd commentedComment #3
mrkdboyd commentedHere is a patch to fix the issue. I'm checking to see if "smtp_on" is overridden and if the value from the form for "smtp_on" is "on". If so, then SMTP is being set to "on" via overrides and we don't want to reset the mail system to the default system mail.
Comment #4
asrobI successfully applied this patch and looks good to me therefore RTBC'ed!
Comment #5
chris matthews commentedThe patch in #3 was RTBC'd 2 years ago and still applies cleanly to 8.x-1.x-dev. Can this be committed?
Comment #6
wundo commentedComment #7
wundo commentedFixed, thanks for the follow up