Skip to main content

Transparent Email clears aliases from email address

Project description

PyPi version Code style: black Downloads Downloads

Transparent Email

Transparent Email clears aliases from email address. Email John.Doe+alias@gmail.com will be transformed to johndoe@gmail.com.

Inspired by : bkrukowski/transparent-email

Why?

To detect multi-accounts on your website.

Supported mailboxes

Installation

pip install transparentemail

Usage

from transparentemail.src import get_primary_email
from transparentemail.services.Emails.emailException import InvalidEmailException

try:
    
    transformed_email = get_primary_email('John.Doe+alias@gmail.com')
    print(transformed_email)  # John.Doe@gmail.com

except InvalidEmailException:
    print('Invalid Email')

Yahoo.com

Aliases work different on Yahoo than on Gmail. On Gmail part after plus is skipped. For example message sent to janedoe+alias@gmail.com will be redirected to janedoe@gmail.com.

Yahoo uses the following pattern*:

baseName-keyword@yahoo.com

  • baseName - value defined by the user, different than email login;
  • keyword - one from a list of keywords defined by the user.

Therefore we do not know what is the real email, so in this case result will be baseName@yahoo.com, which actually does not exist.

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

TransparentEmail-0.1.2.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

TransparentEmail-0.1.2-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page