fix: respect SMTP encryption setting for email notifications#8655
Open
sharkcreep87 wants to merge 1 commit intocoollabsio:nextfrom
Open
fix: respect SMTP encryption setting for email notifications#8655sharkcreep87 wants to merge 1 commit intocoollabsio:nextfrom
sharkcreep87 wants to merge 1 commit intocoollabsio:nextfrom
Conversation
The EsmtpTransport constructor expects bool|null for the tls parameter: - null: auto-detect (try STARTTLS if supported) - true: force implicit TLS (port 465) - false: no encryption Previously 'none' mapped to null which still attempted STARTTLS, and 'tls' mapped to the string 'tls' instead of boolean true. Fixes coollabsio#6442
sharkcreep87
commented
Feb 27, 2026
Contributor
Author
sharkcreep87
left a comment
There was a problem hiding this comment.
Self-review — the fix aligns with Symfony's EsmtpTransport constructor signature (bool|null $tls):
| Setting | Before (broken) | After (fixed) | Symfony behavior |
|---|---|---|---|
starttls |
null |
null (no change) |
Opportunistic STARTTLS |
tls |
'tls' (string) |
true (bool) |
Force implicit TLS |
none |
null (auto-detect) |
false (disabled) |
No encryption |
The 'none' => null mapping was the direct cause — null tells Symfony to auto-detect and attempt STARTTLS, which fails on servers that don't support it.
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
EsmtpTransportconstructor expectsbool|nullfor the TLS parameter, but the code was passing incorrect values:'none'mapped tonull(auto-detect) which still attempted STARTTLS — now correctly maps tofalse'tls'mapped to the string'tls'instead of booleantrue— now correctly maps totruestarttlsnullnull(unchanged)tls'tls'(string)true(bool)nonenull(auto-detect)false(disabled)Fixes #6442
Changes
app/Notifications/Channels/EmailChannel.phpmatchexpression to return correctbool|nullvalues forEsmtpTransportTest plan