Fix 4952 read doctor email receiver from console #6014
Closed
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 is the issue? Where did it come from?
This issue arised because RFC 2606, does not allow sending emails to restricted domains such as example.com. This is why, even with a valid SMTP configuration, PHP Mailer will mark SMTP as disconnected.
A different fix, such as changing the default receiver to perhaps smtp-test[@]appwrite.io could also fix this issue. But perhaps this is a better fix?
What does this PR do?
This PR addresses the issue #4952, as @stnguyen90 mentions exposing the receiver email to the CLI would be the best approach I've implemented the same, with also added a interactive param.
The interactive param is defaulted to 'n', which allows our e2e tests to stay the same. But requires updating our documentation to recommend the user to run doctor in the following way-
Test Plan
I've not made much changes, that would require adding extra tests. Since this is my first pull request, I'm not fully aware of what to fill in here.
Related PRs and Issues
Checklist