Skip to content

[ISSUE-4072][Bug] Use SSL when checking alert email#4363

Open
hutiefang76 wants to merge 1 commit into
apache:devfrom
hutiefang76:codex/streampark-4072-email-ssl
Open

[ISSUE-4072][Bug] Use SSL when checking alert email#4363
hutiefang76 wants to merge 1 commit into
apache:devfrom
hutiefang76:codex/streampark-4072-email-ssl

Conversation

@hutiefang76

Copy link
Copy Markdown

What changed

This fixes the alert email connection check for SSL SMTP settings.

The actual email sending path uses SSL-on-connect when SenderEmail.ssl is enabled, but SettingServiceImpl.checkEmail was enabling STARTTLS instead. That makes the check fail for SSL SMTP servers such as the case reported in #4072.

This patch extracts the JavaMail property building and makes checkEmail set mail.smtp.ssl.enable=true when SSL is selected. Plain SMTP keeps the existing behavior.

Tests

JAVA_HOME=$(/usr/libexec/java_home -v 17) ./mvnw -s /tmp/codex-empty-maven-settings.xml \
  -pl streampark-console/streampark-console-service -am \
  -DskipITs -DskipRat -DskipWeb -DfailIfNoTests=false \
  -Dtest=SettingServiceImplTest test

Also checked:

git diff --check

I used OpenAI Codex to help inspect the issue and prepare the patch, then reviewed the diff and ran the tests above locally.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant