Skip to content

Reapply SMTP auth fix from PR #10939 onto 1.8.x#11441

Closed
Copilot wants to merge 1 commit into1.8.xfrom
copilot/reapply-pull-10939-to-1-8-x
Closed

Reapply SMTP auth fix from PR #10939 onto 1.8.x#11441
Copilot wants to merge 1 commit into1.8.xfrom
copilot/reapply-pull-10939-to-1-8-x

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 3, 2026

The SMTP auth fix from PR #10939 had disappeared from the 1.8.x branch. The core issue: PHPMailer's SMTPAuth was never set, so authentication was never attempted, allowing invalid credentials to be saved silently.

Changes

  • app/controllers/api/projects.php: Set $mail->SMTPAuth based on whether credentials are provided, ensuring authentication is actually validated before saving SMTP config. Error message now surfaces $error->getMessage() directly instead of prepending a redundant prefix.

    $mail->SMTPAuth = (!empty($username) && !empty($password));
  • docker-compose.yml: Maildev configured to require authentication via MAILDEV_INCOMING_USER/MAILDEV_INCOMING_PASS, matching env-sourced credentials.

  • .env: Default SMTP credentials (user/password) set to match maildev auth configuration.

  • tests/e2e/Scopes/ProjectCustom.php / ProjectsConsoleClientTest.php: Tests now read SMTP config from environment variables and include an explicit failure case for invalid credentials (expects 400 + "Could not authenticate" in response).


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Reapply changes from pull request 10939 to branch 1.8.x Reapply SMTP auth fix from PR #10939 onto 1.8.x Mar 3, 2026
@stnguyen90 stnguyen90 closed this Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants