-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Update email validation with Truemail #393
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rationale: truemail is a gem that goes above and beyond when it comes to validating email addresses. It checks the domain, the MX records, and the SMTP server to ensure that the email address is valid. We will use it to ensure that the email addresses being used by the application are valid. This will help us to avoid sending emails to invalid email addresses and improve our mail deliverability.
Changed start methods to clarify boot process: - Renamed Onetime.load! to Onetime.boot! to better reflect its purpose of initializing the application - Updated references to the boot method throughout the codebase - Added documentation to Onetime module and boot method describing the boot process This simplifies initialization and improves grokability by using more precise terminology. The name "load" was somewhat ambiguous, while "boot" more clearly conveys that the application is being started up and prepared to serve requests. "Boot" also implies there's an order of operations which is important to understand when working with the application. Notes: - No functional changes, just naming for clarity - More boot process documentation to be added
The `OT::Config.after_load` method was added to run additional initialization tasks after loading the configuration. It extracts the `:from` email address from the config and configures TrueMail accordingly. Set TrueMail verifier email address after loading onetime configuration. This ensures the verifier email is set properly based on the config, avoiding errors during email validation.
Includes tests for existing email validation logic.
Current we're validating just the format of the email address. Let we'll leverage the Truemail gem to validate whether the email address is actually deliverable, not on a deny list, and not a temporary email address.
delano
added
improvement
Issues or pull requests that involve improvements to the project.
dependencies
Pull requests that update a dependency file
labels
Jun 12, 2024
delano
added
security
Issues or pull requests related to security.
ux
Work that improve user experience, interaction patterns, or interface usability
Bug fix
labels
Jun 12, 2024
Closed
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dependencies
Pull requests that update a dependency file
improvement
Issues or pull requests that involve improvements to the project.
security
Issues or pull requests related to security.
ux
Work that improve user experience, interaction patterns, or interface usability
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.
This pull request updates the email validation in the codebase to use the Truemail gem. Truemail provides comprehensive email validation by checking the domain, MX records, and SMTP server to ensure that the email address is valid. This will help us avoid sending emails to invalid addresses and improve our mail deliverability.
This work only replaces the regex logic and doesn't use the advanced features from Truemail. Later on we'll check the deliverability etc.
Fixes #392