Skip to content

Conversation

@ip-qi
Copy link

@ip-qi ip-qi commented Feb 24, 2025

  • Added additional SMTP authentication method 'PLAIN' which sends single command for user authentication to the mail server when sending emails.
  • Added new config parameter to support change in SMTP AUTH method:
    $SMTPAuthMethod = 'LOGIN' <- which is by default set to LOGIN to avoid breaking existing email setups.

This can be overriden within Config\Email to utilize 'PLAIN' AUTH method

NOTE: 'LOGIN' method could not be tested currently from my part so if possible someone test it please, i have manually tested 'PLAIN' authentication method and it is working as expected.

Explain what you have changed, and why.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@mergeable
Copy link

mergeable bot commented Feb 24, 2025

Hi there, ip-qi! 👋

Thank you for sending this PR!

We expect the following in all Pull Requests (PRs).

Important

We expect all code changes or bug-fixes to be accompanied by one or more tests added to our test suite to prove the code works.

If pull requests do not comply with the above, they will likely be closed. Since we are a team of volunteers, we don't have any more time to work
on the framework than you do. Please make it as painless for your contributions to be included as possible.

See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md

Sincerely, the mergeable bot 🤖

@ip-qi ip-qi closed this Feb 24, 2025
@ip-qi ip-qi reopened this Feb 24, 2025
@ip-qi ip-qi force-pushed the feature/email/SMTP-PLAIN-auth-method branch from 1e680cb to cfd2a60 Compare February 24, 2025 15:26
Copy link
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

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

We should add this new option to the app\Config\Email.php file too.

We also need a changelog entry - the file will be available after merging #9464, so you will have to rebase.

@michalsn michalsn added enhancement PRs that improve existing functionalities 4.7 labels Feb 25, 2025
@ip-qi ip-qi requested a review from michalsn February 25, 2025 12:58
@ip-qi ip-qi force-pushed the feature/email/SMTP-PLAIN-auth-method branch from a41e011 to 23b58b3 Compare February 25, 2025 13:14
Copy link
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

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

Thank you for the updates.

The changelog is now merged, so you can rebase and add an entry there (https://github.com/codeigniter4/CodeIgniter4/blob/4.7/user_guide_src/source/changelogs/v4.7.0.rst), under the section: "Enhancements -> Libraries". You can check previous changelogs to see what convention we use.

@ip-qi ip-qi force-pushed the feature/email/SMTP-PLAIN-auth-method branch from 2e48e51 to beb8700 Compare February 26, 2025 10:09
@ip-qi ip-qi force-pushed the feature/email/SMTP-PLAIN-auth-method branch from 7d43afb to 27fc469 Compare February 26, 2025 10:33
…ction return types

-comment: add depreceation comment for failedSMTPLogin email error message
-refactor: improve authorization validation flow and email error response messages
-added $SMTPAuthMethod in Config\Email file with default value of login
@ip-qi ip-qi force-pushed the feature/email/SMTP-PLAIN-auth-method branch from 27fc469 to f3b64ed Compare February 26, 2025 13:52
ip-qi and others added 4 commits February 26, 2025 15:34
apply suggestion for declaring string type of $SMTPAuthMethod

Co-authored-by: John Paul E. Balandan, CPA <[email protected]>
Apply Suggestion for description of SMTPAuthMethod

Co-authored-by: Michal Sniatala <[email protected]>
Apply suggestions for changelog

Co-authored-by: Michal Sniatala <[email protected]>
@ip-qi ip-qi requested a review from michalsn February 26, 2025 14:56
@michalsn michalsn requested a review from samsonasik February 27, 2025 06:24
@michalsn michalsn merged commit b1f2bee into codeigniter4:4.7 Mar 3, 2025
50 checks passed
@michalsn
Copy link
Member

michalsn commented Mar 3, 2025

@ip-qi Thank you and congratulations on your first contribution to the project!

@ip-qi
Copy link
Author

ip-qi commented Mar 3, 2025

@ip-qi Thank you and congratulations on your first contribution to the project!

@michalsn You are most welcome! I really appreciate the help, collaboration, and direction from both you and @paulbalandan.

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

Labels

4.7 enhancement PRs that improve existing functionalities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants