Check email addresses against the austrian do-not-email list (ECG-Liste)
Project description
This package provides simple access to the austrian RTR (Rundfunk und Telekom Regulierungs-GmbH) “ECG list”, the registry of persons and companies who do not wish to receive promotional e-mail.
Typical usage looks like this:
from ecglist import ECGList e = ECGList() if not e.get_blacklist_status_code(email): send_email(email) else: print "%s does not want to receive email" % email
Usage
from ecglist import ECGList blacklist = ECGList(filename="ecg-liste.hash")
Get an email’s status code:
code = blacklist.get_blacklist_status_code("foo@bar.example")
code will be None if the email address was not found in the blacklist or a status code otherwise. Same, but get a human readable string instead of a status code:
status_str = blacklist.get_blacklist_status("foo@bar.example")
Background
Service providers that send unsolicited advertising e-mail have to observe this list. Please refer to https://www.rtr.at/en/tk/E_Commerce_Gesetz for the legal background. Unfortunately, the only sample code provided by the RTR is in Perl (Boo! Hiss!), which prompted the creation of this module.
Obtaining the official blacklist
You will need to follow the steps outlined at https://www.rtr.at/en/tk/NutzenECG to obtain a copy of the current ECG list. Save the “ecg-liste.hash” you receive and configure the ECGList to access that file.
Installation
To install this module, simply:
$ pip install email-ecglist
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file email-ecglist-1.0.tar.gz
.
File metadata
- Download URL: email-ecglist-1.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbd4165ba440bb74359c34e796a523c932341bf09bb8b38bdf936e832c244881 |
|
MD5 | e4ba3c56db5e75435a649b82ab36f133 |
|
BLAKE2b-256 | 3d240bb05801a5a5ecfa07a6b7f4f6284ad97f78d6d30c076d6914fb957b540e |