---
title: "Discussion on \"How Do You Verify Email Addresses in Python (Syntax, MX, and SMTP Checks)?\" | Hashnode"
description: "Discussion on \"How Do You Verify Email Addresses in Python (Syntax, MX, and SMTP Checks)?\". Email verification works by running a series of checks in order: syntax, domain and MX records, and then (where the server allows it) an SMTP-level mailbox check. Each stage rules out more bad address"
url: "https://hashnode.com/posts/how-do-you-verify-email-addresses-in-python-syntax-mx-and-smtp-checks/6afd3fc7d8a157f6bb92821e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How Do You Verify Email Addresses in Python (Syntax, MX, and SMTP Checks)?](https://mafzalkalwardev.hashnode.dev/how-do-you-verify-email-addresses-in-python-syntax-mx-and-smtp-checks?utm_source=hashnode&utm_medium=feed)

Email verification works by running a series of checks in order: syntax, domain and MX records, and then (where the server allows it) an SMTP-level mailbox check. Each stage rules out more bad address

7h ago · 3 min read · mafzalkalwardev.hashnode.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#email](https://hashnode.com/tag/email)
-   [#tutorial](https://hashnode.com/tag/tutorial)
-   [#webdev](https://hashnode.com/tag/webdev)
-   [#backend](https://hashnode.com/tag/backend)

## Written by

[Muhammad Afzal Kalwar](https://hashnode.com/@mafzalkalwardev)

@mafzalkalwardev · Islamabad, Pakistan

  
[View profile](https://hashnode.com/@mafzalkalwardev)

Python Automation Engineer & Founder, INDUS Web Agency

Python automation engineer with 4 years of experience, working freelance as founder of INDUS Web Agency. I build auto dialers, AI call agents, web scrapers, CRM dashboards and Chrome extensions with Python, FastAPI, Node.js and Next.js. 122 public GitHub repos, 3 live Chrome Web Store extensions. Available immediately, any time zone.

## Responses 1

Markdown supported · ⌘↵ to post

[Furqan Ashraf](https://hashnode.com/@jfreaks)

[46m ago](https://hashnode.com/posts/how-do-you-verify-email-addresses-in-python-syntax-mx-and-smtp-checks/6afd3fc7d8a157f6bb92821e/comment/6afd97996bb10234cd82b2e6)

On your question about filling a gap versus inventing an answer: I'd say data from a named source with a timestamp is filling the gap. Guessing from a neighbouring park is inventing. Your "unknown, not zero" rule already puts you on the right side.

One thing I'd look for as a visitor is weather on each park page. You already have coordinates from the NPS data and a daily GitHub Action, so it's one more loop in the same job: 62 lat/lon calls, cached into the page data. Air quality is worth showing for the western parks in fire season, and sunrise/sunset is what photographers check first.

If you'd like those three on one key, APIFreaks has forecast, air quality and astronomy endpoints that all take lat/lon: [https://apifreaks.com/api/weather-forecast](https://apifreaks.com/api/weather-forecast). The free credits are enough to test it on all 62.
