Re: Email Validation with domain

2008-07-02 Thread Sallu
On Jul 2, 6:25 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > Sallu <[EMAIL PROTECTED]> writes: > > validateEmail(msg)  i wrote a script above it works fine > > Actually, no. It rejects a great many email addresses that are valid. > > > but it does not check for valid domain like .com .org .in how to

Re: Email Validation with domain

2008-07-02 Thread Ben Finney
Sallu <[EMAIL PROTECTED]> writes: > validateEmail(msg) i wrote a script above it works fine Actually, no. It rejects a great many email addresses that are valid. > but it does not check for valid domain like .com .org .in how to > validate with domain To validate a domain for delivery of email

Re: Email Validation with domain

2008-07-02 Thread livibetter
> If you want to validate the domain, do a DNS lookup on the domain or > some such. I don't think there are standard modules to provide this > functionality included with python. You could try using the socket > module, and reading up on the relevant protocols, or making calls to > external progra

Re: Email Validation with domain

2008-07-02 Thread oj
On Jul 2, 12:41 pm, Sallu <[EMAIL PROTECTED]> wrote: > Hi All,   import re > msg=raw_input('Enter the email : ') > > def validateEmail(email): > >         #if re.match("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9] > {1,3})(\\]?)$", email) != None: >         if re.match("^([EMAIL PROTECTED]

Email Validation with domain

2008-07-02 Thread Sallu
Hi All, import re msg=raw_input('Enter the email : ') def validateEmail(email): #if re.match("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9] {1,3})(\\]?)$", email) != None: if re.match("^([EMAIL PROTECTED])@((?:[-a-z0-9]+\.)+[a-z]{2,})$", email) != None: p