~openerp-community/openobject-addons/trunk-addons-community

« back to all changes in this revision

Viewing changes to mailing/mailing_core.py

  • Committer: zyphos
  • Date: 2010-01-29 08:31:03 UTC
  • Revision ID: zyphos@zyphos.be-20100129083103-3vjdlrkil6b5q2ew
[FIX] Mailing, handle partner without email address

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
    # available at http://www.ietf.org/rfc/rfc2821.txt
48
48
    # Input: email
49
49
    # Output: True if email is valid
 
50
    if not isinstance(email, basestring): return False
50
51
    global email_regex
51
52
    if email_regex is None:
52
53
        regex = '^[a-z0-9._%-]+[a-z0-9_%-]+@[a-z0-9._%-]+.[a-z]{2,6}$'