Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

A Django reusable app that provides a form field and validators that check if an email is disposable/throwaway.

Project description

# Django BDEmails

[django-bdemails](https://bdemails.com/console/integration) is an app that provides a form field and
validators that check if an email is disposable/throwaway.

### Installation

You can install django-bdemails with pip by typing

```
pip install django-bdemails
```

Or with easy_install by typing

```
easy_install django-bdemails
```

Or manually by downloading a tarball and typing

```
python setup.py install
```

### Settings

django-bdemails adds 7 settings

Specifies an API Key to use with [BDEmails](https://bdemails.com)

```
BDEMAILS_API_KEY = "" # Defaults to None which disables this validator
```

Specifies a different URL to use for the [BDEmails](https://bdemails.com) API

```
BDEMAILS_URL = "" # Defaults to "https://bdemails.com/api/json/%(api_key)s/%(domain)s"
```

Specifies if we should block an email if an exception occurs trying to check [BDEmails](https://bdemails.com)

```
BDEMAILS_URLERROR = False or True # Defaults to False
```

Specifies what message should appear if the domain is blocked

```
BDEMAILS_BLOCKED_MESSAGE = "" # Defaults to "Disposable emails are not allowed. Please try again."
```

Specifies what message should appear if the domain is not exists

```
BDEMAILS_NOT_EXISTS_MESSAGE = "" # Defaults to "Disposable emails are not allowed. Please try again."
```

Specifies what message should appear if the domain has no MX record

```
BDEMAILS_NO_MX_MESSAGE = "" # Defaults to "You entered an email that has no MX record. Please try again."
```

Specifies what message should appear if the domain is a free email service provider (and is not allowed in your own whitelist list)

```
BDEMAILS_FESP_MESSAGE = "" # Defaults to "This free email service provider is blocked. Please try again."
```

### Usage

To use the formfield simply import it and use it

```
from django import forms
from bdemails.fields import EmailField

class ExampleForm(forms.Form):
email = EmailField()
```

### Credits

* **Donald Stufft** - [dstufft](https://github.com/dstufft)

Project details


Release history Release notifications

This version
History Node

1.0.6

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django-bdemails-1.0.6.tar.gz (3.8 kB) Copy SHA256 hash SHA256 Source None Jul 30, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page