Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse order in checking mail config styles #107

Merged
merged 3 commits into from
Oct 17, 2022
Merged

Conversation

bennothommo
Copy link
Member

Fixes wintercms/winter#626

This reverses the order for checking mail configs by searching for the new format first, then checking for the old format.

Laravel checks old format first, then new format, which works fine for them, but doesn't work for us as we also populate settings via the Backend, which populates the settings in the new format.

There is a small gotcha here - I believe the Backend stored the config in the old format pre v1.2, which means if someone upgrades their config/mail.php to follow the new format, this will make the config file take precedence. Saving the settings in the Backend again will alleviate this.

This reverses the order for checking mail configs by searching for the new format first, then checking for the old format.

Laravel checks old format first, then new format, which works fine for them, but doesn't work for us as we also populate settings via the Backend, which populates the settings in the new format.

Fixes wintercms/winter#626
@LukeTowers
Copy link
Member

@bennothommo could you go into more detail on this part:

There is a small gotcha here - I believe the Backend stored the config in the old format pre v1.2, which means if someone upgrades their config/mail.php to follow the new format, this will make the config file take precedence. Saving the settings in the Backend again will alleviate this.

@bennothommo
Copy link
Member Author

@LukeTowers never mind that comment - I've just checked and @mjauvin's PR to the MailSetting model covers this scenario, so it should be fine to merge.

@LukeTowers LukeTowers merged commit 302593d into develop Oct 17, 2022
@LukeTowers LukeTowers deleted the fix/winter-626 branch October 17, 2022 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Winter 1.2 not using SMTP settings from database
2 participants