Growing India News, world news, nation news, our news, people's news, grow news, entertainment, fashion, movies, tech, automobile and many more..
Wednesday, July 30, 2025
Show HN: I built a deep email validation library in Kotlin https://ift.tt/6i7Rylq
Show HN: I built a deep email validation library in Kotlin Show HN: I built a deep email validation library to learn Kotlin Hey HN, I wanted a real-world project to properly learn Kotlin (coroutines, DSLs, etc.) and decided to tackle a problem I've found surprisingly underserved: comprehensive email validation. Most solutions stop at regex, but that doesn't prevent sign-ups from user@notarealdomain.com or disposable email services. So, I built a library that performs a series of deeper checks. I just tagged the v1.0.0 release because the API is now stable and I think it's ready for feedback from the community. It validates an email in layers: 1. Syntax: A robust check that's more reliable than a typical regex. 2. Domain Registrability: Checks the domain against the Public Suffix List to ensure it's on a real TLD. 3. MX Records: A DNS query to see if the domain is actually configured to receive email. 4. Disposable Services: Checks against a list of known temporary/throwaway email providers. 5. SMTP Connection (Optional): A live check to see if the mailbox actually exists. This is off by default since port 25 is often blocked, but can be enabled via a proxy. One of my main goals was to build something that would be useful on both the server and on a client like an Android app. This led to a couple of key design decisions: - It's built with coroutines for non-blocking, concurrent I/O. - It has a full offline mode. You can disable all network checks and run it using bundled datasets for things like syntax and disposable domain checks, which is great for providing instant, client-side feedback. The configuration is done through a simple Kotlin DSL. The project is MIT licensed. I'm posting this to get your thoughts on the approach, the architecture, or any Kotlin idioms I might have missed. How do you all typically handle this problem beyond regex? GitHub: https://ift.tt/ku46KW1 https://ift.tt/ku46KW1 July 29, 2025 at 11:40PM
Subscribe to:
Post Comments (Atom)
Show HN: Fast Elevation API with memory mapped tiles https://ift.tt/wpxiYuW
Show HN: Fast Elevation API with memory mapped tiles I recently wrote and launched a high-performance Elevation API, built from the ground u...
-
Show HN: An AI logo generator that can also generate SVG logos Hey everyone, I've spent the past 2 weeks building an AI logo generator, ...
-
Breaking #FoxNews Alert : Number of dead rises after devastating tornadoes, Kentucky governor announces — R Karthickeyan (@RKarthickeyan1)...
-
Show HN: Snap Scope – Visualize Lens Focal Length Distribution from EXIF Data https://ift.tt/yrqHZtDShow HN: Snap Scope – Visualize Lens Focal Length Distribution from EXIF Data Hey HN, I built this tool because I wanted to understand which...
No comments:
Post a Comment