Skip to content

Email validation#1825

Open
bmos wants to merge 19 commits intomove-coop:mainfrom
bmos:email_validation
Open

Email validation#1825
bmos wants to merge 19 commits intomove-coop:mainfrom
bmos:email_validation

Conversation

@bmos
Copy link
Copy Markdown
Collaborator

@bmos bmos commented Apr 10, 2026

What is this change?

  • Replace validate_email dependency with email-validator.
  • Add additional email validation tests.
  • _validate_email_string now behaves consistently across python versions.
  • Add keyword args to _validate_email_string to allow for optional domain name validation.
  • Add keyword args to send_email to allow for optional domain name validation.

Considerations for discussion

  • validate_email was last updated in 2015 and has 80 open issues (many with no response from package maintainers).
    It had 2 million downloads in the past month.
  • email-validator was last updated in 2025 and has 12 open issues (all of which have been followed-up on).
    It had 174 milliion downloads in the past month.
  • It can be helpful to know whether an email server is misconfigured/not real before trying to email it.
    Having domain validation functionality in send_email and _validate_email_string could be helpful.

How to test the changes (if needed)

  • CI tests should be adequate

Breaking Changes

Breaking changes are changes to our public API which may require existing users to change their code. If there are no breaking changes, any existing parsons user should not need to do anything after updating their parsons version.

Does this PR introduce breaking changes?
  • label: Breaking change — This PR introduces one or more breaking changes.
  • label: Non-breaking change — This PR does not introduce one or more breaking changes.

Details (if needed)

  • Minor: Emails like "ana@mailserver" (dotless domain names) will now be detected as invalid.
    The old package allowed them, but they are not allowed according to ICANN.

@github-actions github-actions bot added testing Work type - writing or changing code tests for core Parsons features or Parsons connectors python Pull requests that update Python code dependencies Pull requests that update a dependency file breaking-change applied only to PRs, indicates when something has a breaking change to be flagged in release notes labels Apr 10, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 10, 2026

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  parsons/notifications
  sendmail.py 304
Project Total  

This report was generated by python-coverage-comment-action

@bmos bmos force-pushed the email_validation branch from ceaad72 to 0530279 Compare April 10, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change applied only to PRs, indicates when something has a breaking change to be flagged in release notes dependencies Pull requests that update a dependency file python Pull requests that update Python code testing Work type - writing or changing code tests for core Parsons features or Parsons connectors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant