{"id":22300408,"url":"https://github.com/mailboxvalidator/flask_mailboxvalidator","last_synced_at":"2025-07-29T02:31:46.657Z","repository":{"id":57430473,"uuid":"153387245","full_name":"MailboxValidator/Flask_MailboxValidator","owner":"MailboxValidator","description":"MailboxValidator Flask module enable users to block disposal email, detect free email and validate if an email is valid.","archived":false,"fork":false,"pushed_at":"2024-01-02T02:25:01.000Z","size":206,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-16T03:12:40.552Z","etag":null,"topics":["email-validation","email-validator","email-verification","email-verifier","flask","flask-application","flask-mailboxvalidator","flask-python","mailboxvalidator-api"],"latest_commit_sha":null,"homepage":"https://www.mailboxvalidator.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MailboxValidator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-10-17T03:00:07.000Z","updated_at":"2023-06-20T01:39:50.000Z","dependencies_parsed_at":"2024-01-02T03:29:34.619Z","dependency_job_id":"ab9c042f-f77a-4c1c-ac9b-ff12e83c060b","html_url":"https://github.com/MailboxValidator/Flask_MailboxValidator","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"8968be1c452dbffabb827779135d413eb2ccedc7"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MailboxValidator%2FFlask_MailboxValidator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MailboxValidator%2FFlask_MailboxValidator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MailboxValidator%2FFlask_MailboxValidator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MailboxValidator%2FFlask_MailboxValidator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MailboxValidator","download_url":"https://codeload.github.com/MailboxValidator/Flask_MailboxValidator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227971950,"owners_count":17849421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email-validation","email-validator","email-verification","email-verifier","flask","flask-application","flask-mailboxvalidator","flask-python","mailboxvalidator-api"],"created_at":"2024-12-03T18:10:51.190Z","updated_at":"2024-12-03T18:10:51.841Z","avatar_url":"https://github.com/MailboxValidator.png","language":"Python","readme":"MailboxValidator Flask Python Module\n==============================\n\nThis Flask Python module enables user to easily validate if an email address is valid, a type of disposable email or free email.\n\nThis module can be useful in many types of projects, for example\n\n - to validate an user's email during sign up\n - to clean your mailing list prior to email sending\n - to perform fraud check\n - and so on\n\n\n\nInstallation\n============\n\nTo install this module type the following:\n\n\tpip install flask_MailboxValidator\n\n\n\nDependencies\n============\n\nAn API key is required for this module to function. Go to https://www.mailboxvalidator.com/plans#api to sign up for FREE API plan and you'll be given an API key.\n\nIn order to use this module to validate email from form, WTForms and Flask-WTF need to be installed. Also, nose2 need to be installed in order to run the test file.\n\n\n\nFunctions\n=========\n\n## SingleValidation (api_key)\n\nCreates a new instance of the MailboxValidator object with the API key.\n\n## ValidateEmail (email_address)\n\nPerforms email validation on the supplied email address.\n\n### Return Fields\n\n| Field Name             | Description                                                  |\n| ---------------------- | ------------------------------------------------------------ |\n| email_address          | The input email address.                                     |\n| domain                 | The domain of the email address.                             |\n| is_free                | Whether the email address is from a free email provider like Gmail or Hotmail. Return values: True, False |\n| is_syntax              | Whether the email address is syntactically correct. Return values: True, False |\n| is_domain              | Whether the email address has a valid MX record in its DNS entries. Return values: True, False, -\u0026nbsp;\u0026nbsp;\u0026nbsp;(- means not applicable) |\n| is_smtp                | Whether the mail servers specified in the MX records are responding to connections. Return values: True, False, -\u0026nbsp;\u0026nbsp;\u0026nbsp;(- means not applicable) |\n| is_verified            | Whether the mail server confirms that the email address actually exist. Return values: True, False, -\u0026nbsp;\u0026nbsp;\u0026nbsp;(- means not applicable) |\n| is_server_down         | Whether the mail server is currently down or unresponsive. Return values: True, False, -\u0026nbsp;\u0026nbsp;\u0026nbsp;(- means not applicable) |\n| is_greylisted          | Whether the mail server employs greylisting where an email has to be sent a second time at a later time. Return values: True, False, -\u0026nbsp;\u0026nbsp;\u0026nbsp;(- means not applicable) |\n| is_disposable          | Whether the email address is a temporary one from a disposable email provider. Return values: True, False, -\u0026nbsp;\u0026nbsp;\u0026nbsp;(- means not applicable) |\n| is_suppressed          | Whether the email address is in our blacklist. Return values: True, False, -\u0026nbsp;\u0026nbsp;\u0026nbsp;(- means not applicable) |\n| is_role                | Whether the email address is a role-based email address like admin@example.net or webmaster@example.net. Return values: True, False, -\u0026nbsp;\u0026nbsp;\u0026nbsp;(- means not applicable) |\n| is_high_risk           | Whether the email address contains high risk keywords. Return values: True, False, -\u0026nbsp;\u0026nbsp;\u0026nbsp;(- means not applicable) |\n| is_catchall            | Whether the email address is a catch-all address. Return values: True, False, Unknown, -\u0026nbsp;\u0026nbsp;\u0026nbsp;(- means not applicable) |\n| mailboxvalidator_score | Email address reputation score. Score \u003e 0.70 means good; score \u003e 0.40 means fair; score \u003c= 0.40 means poor. |\n| time_taken             | The time taken to get the results in seconds.                |\n| status                 | Whether our system think the email address is valid based on all the previous fields. Return values: True, False |\n| credits_available      | The number of credits left to perform validations.           |\n| error_code             | The error code if there is any error. See error table in the below section. |\n| error_message          | The error message if there is any error. See error table in the below section. |\n\n## DisposableEmail (email_address)\n\nCheck if the supplied email address is from a disposable email provider.\n\n### Return Fields\n\n| Field Name        | Description                                                  |\n| ----------------- | ------------------------------------------------------------ |\n| email_address     | The input email address.                                     |\n| is_disposable     | Whether the email address is a temporary one from a disposable email provider. Return values: True, False |\n| credits_available | The number of credits left to perform validations.           |\n| error_code        | The error code if there is any error. See error table in the below section. |\n| error_message     | The error message if there is any error. See error table in the below section. |\n\n## FreeEmail (email_address)\n\nCheck if the supplied email address is from a free email provider.\n\n### Return Fields\n\n| Field Name        | Description                                                  |\n| ----------------- | ------------------------------------------------------------ |\n| email_address     | The input email address.                                     |\n| is_free           | Whether the email address is from a free email provider like Gmail or Hotmail. Return values: True, False |\n| credits_available | The number of credits left to perform validations.           |\n| error_code        | The error code if there is any error. See error table in the below section. |\n| error_message     | The error message if there is any error. See error table below. |\n\n\n\n# Usage for validate email from form\n\n*Note: WTForms and Flask-WTF must be installed before using this features.*\n\nThis Flask Python module had three different validator for different uses: EmailValidation for validating email address by all parameters, DisposableEmailValidation for validating disposable email address, and FreeEmailValidation for validating free email address.\n\n1. Import the validator class from the package. For example: `from flask_MailboxValidator.SingleValidation import EmailValidation`\n2. Call the validator in validator array along with your API key. For example: `email = StringField('Email:', validators=[validators.InputRequired(), EmailValidation(apikey='Your_API_Key')])`\n\n\nSample Codes\n============\n\n## Validate email\n\n```python\nimport flask_MailboxValidator\nfrom flask import Flask\nfrom flask import jsonify\n\napp = Flask(__name__)\n\nmbv = flask_MailboxValidator.SingleValidation('PASTE_API_KEY_HERE')\nresults = mbv.ValidateEmail('example@example.com')\n\n@app.route('/')\ndef display_result():\n\tif results is None:\n\t\treturn(\"Error connecting to API.\\n\")\n\telif 'error' not in results:\n\t\treturn (jsonify(results))\n\telse:\n\t\treturn('error_message = ' + results['error']['error_message'] + \"\\n\")\n```\n\n\nCheck if an email is from a disposable email provider\n-------------------------------------------------------------------\n\n```python\nimport flask_MailboxValidator\nfrom flask import Flask\nfrom flask import jsonify\n\napp = Flask(__name__)\n\nmbv = flask_MailboxValidator.SingleValidation('PASTE_API_KEY_HERE')\nresults = mbv.DisposableEmail('example@example.com')\n\n@app.route('/')\ndef display_result():\n\tif results is None:\n\t\treturn(\"Error connecting to API.\\n\")\n\telif 'error' not in results:\n\t\treturn (jsonify(results))\n\telse:\n\t\treturn('error_message = ' + results['error']['error_message'] + \"\\n\")\n```\n\n\nCheck if an email is from a free email provider\n------------------------------------------------------------\n\n```python\nimport flask_MailboxValidator\nfrom flask import Flask\nfrom flask import jsonify\n\napp = Flask(__name__)\n\nmbv = flask_MailboxValidator.SingleValidation('PASTE_API_KEY_HERE')\nresults = mbv.FreeEmail('example@example.com')\n\n@app.route('/')\ndef display_result():\n\tif results is None:\n\t\treturn(\"Error connecting to API.\\n\")\n\telif 'error' not in results:\n\t\treturn (jsonify(results))\n\telse:\n\t\treturn('error_message = ' + results['error']['error_message'] + \"\\n\")\n```\n\n# Test\n\nTo run the test file, you will first need to replace the 'PASTE_API_KEY_HERE' with your API key in the test file(Located at test directory). After that, run this command in terminal: `python setup.py test`\n\n\nErrors\n======\n\n| error_code | error_message |\n| ---------- | ------------- |\n| 10000 | Missing parameter. |\n| 10001 | API key not found. |\n| 10002 | API key disabled. |\n| 10003 | API key expired. |\n| 10004 | Insufficient credits. |\n| 10005 | Unknown error. |\n\nCopyright\n=========\n\nCopyright (C) 2018-2024 by MailboxValidator.com, support@mailboxvalidator.com\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailboxvalidator%2Fflask_mailboxvalidator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmailboxvalidator%2Fflask_mailboxvalidator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailboxvalidator%2Fflask_mailboxvalidator/lists"}