Repository navigation
fix(settings): a fresh install's first settings save no longer turns off every email - #194
Merged
Merged
Conversation
…off every email The mailer treats an unset MailEnabled as on, but the General settings page ticked its "Enable outgoing emails" box only for '1'. On a fresh install the box looked off, and the first save of the page, for any field, wrote '0': every invoice, reminder and password reset was then cancelled, with only an info line in the log. The page now reads the switch the way the mailer does, through SuppressMailWhenDisabled::isOn().
Mail::raw() returns null when a MessageSending listener cancels the send, and the button reported that as sent. With outgoing email switched off it now says so; when a mail hook cancelled it, it says that.
Panelica
pushed a commit
that referenced
this pull request
Oct 16, 2026
Spanish is a community language kept at 100%: settings.test_email_mail_off and settings.test_email_cancelled, so the test button does not fall back to English.
Owner
|
Thank you @ertugrulkeyvan, merged in 77d59ff. A silent "every email off" after the first save of the settings page is exactly the kind of thing that is hard to notice until invoices stop arriving, so this is a valuable find. What we checked:
Full suite on the merged branch (with #195): 4230 passed, 3 skipped, 0 failed. The This will be part of the next release. |
Panelica
pushed a commit
that referenced
this pull request
Oct 21, 2026
Selling Panelica licenses with a partner account (the Panelica Licenses page, the module, the customer's own install command), knowledge base and announcements in more than one language (#201, #203), the knowledge base search (#202), retrying a refused domain registration (#197), keeping the card that paid (#209), reports and statuses in the admin's language (#208, #205), the Panelica module's messages in the customer's language (#199), the registrant's phone on domain orders (#196), panel sign-in by name (#200), and the fixes of #193, #194, #195, #198, #204, #206 and #207. Database: three new translation tables. A MINOR beta, the second of 1.6.0.
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.
What
Found on a fresh 1.5.0 install from
install.sh(Rocky Linux 9, also true onmain): the first save of Setup -> General turns off all outgoing email, and the test email button still says the email was sent.SuppressMailWhenDisabledtreats an unsetMailEnabledas on, so a fresh install sends mail. The settings page ticks "Enable outgoing emails" only when the value is'1'. On a fresh install the box therefore looks off. Saving the page for any other field (company name, address) posts the hidden0, and from then on every invoice, reminder, order confirmation and password reset is cancelled. The only trace is an info line in the log: "Outgoing mail suppressed".Mail::raw()returnsnullwhen aMessageSendinglistener cancels the send, and the button reported that as "Test email sent".On the test server: fresh install, wizard, saved the General page once with the mail fields only, pressed the test button. The answer was "sent (via sendmail)"; Postfix never saw a message, and
settings.MailEnabledwas0.How
SuppressMailWhenDisabled::isOn()holds the rule the listener already used (empty means on;0,false,off,nomean off). The listener and the checkbox both use it.success: falsewith "outgoing email is turned off on this page", or "a mail hook cancelled it" when the switch is on and something else stopped it. Two new keys,admin.settings.test_email_mail_offandadmin.settings.test_email_cancelled, in en, tr, de, pl and zh.0is left alone, since it may be a deliberate choice. Those operators now see the box unticked, which is what their mail is doing, and the test button tells them.Tests
tests/Feature/MailEnabledSwitchTest.php, four new tests (seven cases); three fail onmainand pass here:1andtrueticked,0andfalsenot;Full suite: 4229 passed. The one failure is the
CurrencyAndBackupTestdb backup test, which fails onmaintoo in my local setup.