mail: remember SMTP settings for each provider type - #524
Open
t0ma5 wants to merge 1 commit into
Open
Conversation
Mail Settings only stored one live mailserver_* row, so saving Gmail erased Custom and there was no slot for Brevo, SMTP2GO or SES. Each type now has its own preference; factory host/port fill empty fields; an empty posted slot for an inactive type cannot wipe a saved one. Live send still reads mailserver_*. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mailserver_*row, so saving Gmail erased Custom and there was no slot for a transactional provider.mailserver_preset_{type}JSON preference. Factory host/port/encryption fill empty fields (no site credentials). Saving one type cannot wipe another: an empty posted slot for an inactive type is ignored.osc_sendMail()still reads the livemailserver_*preferences. The extra slots only park a second provider so you can switch and Save on the one that should send.smtp.gmail.com/ 465 / ssl. SES usesemail-smtp.us-east-1.amazonaws.comas a region placeholder. Docs:docs/site/configure/mail-server.md.This overlaps Mail Settings JS with #523 (test-email button). Merge that first if both land; rebase this one if
mailserver.phpconflicts.Test plan
php tests/mailserver-presets.php(normalize/factory/sanitize/merge: saving Brevo does not wipe stored SMTP2GO)mailserver_*is the active type)Made with Cursor