Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

e-mail address validation

New Here ,
Sep 12, 2006 Sep 12, 2006
Is there any technique in coldfusionMX7 that can verify that whether the given e-mail address is valid or not.Please help me with this coz i am starting a project where the only means to contact the user is through his e-mail address.So i need it.
thankx in advance
TOPICS
Getting started
669
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 12, 2006 Sep 12, 2006
> Is there any technique in coldfusionMX7 that can verify that whether the given
> e-mail address is valid or not.

Yes.

http://instantbadger.blogspot.com/2006/08/regex-to-fully-validate-rfc822-email.html

--
Adam
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 12, 2006 Sep 12, 2006
ajjani wrote:
> Is there any technique in coldfusionMX7 that can verify that whether the given

isValid("email",yourEmailDataGoesHere)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 12, 2006 Sep 12, 2006
> isValid("email",yourEmailDataGoesHere)

This doesn't work reliably though. It passes invalid email addresses and
fails valid ones.

I'd only use it if it didn't really matter what the result was.

--
Adam
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 12, 2006 Sep 12, 2006
Checking that an email address is in an accepted format is quite different from determining if the email address is valid and actually belongs to the person submitting the form.

Send an email to the email address provided, and wait for a reply confirmation from the user, or something like that.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 12, 2006 Sep 12, 2006
Adam Cameron wrote:
>> isValid("email",yourEmailDataGoesHere)
>
> This doesn't work reliably though. It passes invalid email addresses and
> fails valid ones.

for instance?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2006 Sep 13, 2006
>> This doesn't work reliably though. It passes invalid email addresses and
>> fails valid ones.
>
> for instance?

Invalid as the local part is too long (64 chars):
Address:
abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij@domain.com
Length of local: 70
isValid? YES
Invalid as the domain part is too long (255 chars):
Address:
a@123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0.com
Length of domain: 260
isValid? YES
Valid using slightly obscure but valid chars in local:
Address: a!a@domain.com
isValid? NO
Valid using slightly obscure but valid chars in local:
Address: a=a@domain.com
isValid? NO
Valid using quoted string in local:
Address: "John Smith"@domain.com
isValid? NO
Valid using escaped @ local:
Address: Abc\@def@domain.com
isValid? NO
Valid using escaped space local:
Address: Fred\ Bloggs@domain.com
isValid? NO
Other valid example from http://tools.ietf.org/html/rfc3696:
Address: $A12345@domain.com
isValid? NO
Other valid example from http://tools.ietf.org/html/rfc3696:
Address: !def!xyz%abc@domain.com
isValid? NO

Reading (for you, and for Adobe dev team):
http://en.wikipedia.org/wiki/Email_address
http://tools.ietf.org/html/rfc2822
http://tools.ietf.org/html/rfc3696

--
Adam
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2006 Sep 13, 2006
Adam Cameron wrote:
>>> This doesn't work reliably though. It passes invalid email addresses and
>>> fails valid ones.

thanks for the info--though i'd hardly call these cases reason to throw away
isValid. btw javamail parse() (w/strict on) also fails some of these. have you
ever put this for an enhancement? tom recently blogged about this issue, maybe a
comment there wil get his attention.

http://tjordahl.blogspot.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2006 Sep 13, 2006
LATEST
> thanks for the info--though i'd hardly call these cases reason to throw away
> isValid.

For the purposes of of validating emails, I probably would (throw it away,
that is) if I needed to validate emails. If you NEED valid emails, it
doesn't do a complete job, and I'd go as far as to say its support for
punctuation is unacceptably poor. But I think this highlights the fact
that validating email addresses is probably a fool's errand. Did you look
@ the regex at that link I posted? It's ludicrous. I also note it fails
on the length-based and escaped-characters tests. So even when someone's
gone to GREAT pains to come up with a regex to validate email addresses, it
still doesn't work reliably. And, really, what's the point?


> have you
> ever put this for an enhancement?

I had never used isValid() before y/day. For any situation.

--
Adam
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources