Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration option for email sender address apart from SMTP username #5351

Merged
merged 4 commits into from
Mar 24, 2024
Merged

Conversation

lingrottin
Copy link
Contributor

@lingrottin lingrottin commented Feb 10, 2024

What type of PR is this?

/kind bug
/kind api-change

What this PR does / why we need it:

As described in #5350, when using Amazon SES, for example, as email provider, SMTP username for authentication may not exactly match sender email address. When this happens, websites using Halo will not be able to send emails due to invalid addresses that Halo put in SMTP requests. This PR adds a configuration field for those who got a non-email-address username to specify one separately.

Which issue(s) this PR fixes:

Fixes #5350

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Yes

邮件通知配置添加发送邮件地址配置选项。

@f2c-ci-robot f2c-ci-robot bot added kind/bug Categorizes issue or PR as related to a bug. release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. labels Feb 10, 2024
@f2c-ci-robot f2c-ci-robot bot requested a review from guqing February 10, 2024 09:18
@CLAassistant
Copy link

CLAassistant commented Feb 10, 2024

CLA assistant check
All committers have signed the CLA.

@f2c-ci-robot f2c-ci-robot bot added the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label Feb 10, 2024
@f2c-ci-robot f2c-ci-robot bot requested a review from lan-yonghui February 10, 2024 09:18
Copy link

sonarcloud bot commented Feb 10, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@ruibaby ruibaby requested review from JohnNiang and LIlGG February 18, 2024 02:48
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ping @guqing

Please help us review the PR.

@guqing
Copy link
Member

guqing commented Feb 18, 2024

Hi @lingrottin, Thanks for your contribution, please fix the code style by Code Style and unit test cases first

@lingrottin
Copy link
Contributor Author

Hi, sorry for the late reply due to schooling issues. I have fixed the format issues and checked them with checkstyle. Additional unit tests is not required as this PR only modifies the inside of class EmailNotifier which has but a notify method exported and being referenced. Existing DefaultNotificationSenderTest case would include the test of this.

Copy link

codecov bot commented Mar 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 56.54%. Comparing base (5fdf6c0) to head (c12bb2a).
Report is 76 commits behind head on main.

Files Patch % Lines
.../java/run/halo/app/notification/EmailNotifier.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5351      +/-   ##
============================================
- Coverage     56.91%   56.54%   -0.38%     
+ Complexity     3319     3313       -6     
============================================
  Files           587      592       +5     
  Lines         18968    19204     +236     
  Branches       1401     1355      -46     
============================================
+ Hits          10795    10858      +63     
- Misses         7594     7784     +190     
+ Partials        579      562      -17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Mar 23, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Thanks for your first contribution!

ping @halo-dev/sig-halo

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Mar 23, 2024
@ruibaby ruibaby added this to the 2.14.x milestone Mar 24, 2024
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Thank you for first contribution!

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 24, 2024
@JohnNiang JohnNiang requested a review from ruibaby March 24, 2024 09:35
Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link

f2c-ci-robot bot commented Mar 24, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang, ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot merged commit 687c1b2 into halo-dev:main Mar 24, 2024
8 checks passed
@ruibaby ruibaby modified the milestones: 2.14.x, 2.14.0 Mar 25, 2024
@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. labels Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

邮箱发送缺失单独的 Sender 配置
5 participants