Skip to content

Commit

Permalink
forgot mgship/email.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kouk committed Oct 27, 2016
1 parent 3ecd9b5 commit a8893c5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mgship/email.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
"""Various utilities for emails."""
from __future__ import absolute_import

from email_validator import validate_email, EmailNotValidError


def is_email(value):
try:
validate_email(value, check_deliverability=False)
except EmailNotValidError as e:
raise ValueError(str(e))

0 comments on commit a8893c5

Please sign in to comment.