I'm using this, but I'm not sure whether it's bug-free:
preg_match('/^([.0-9a-z_+-]+)@([0-9a-z-]+\.)+[0-9a-z]{2,6}$/i', $email);
Note: IIRC, PEAR function will invalidate all adresses in museum TLD.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
On Thu, November 3, 2005 8:16 am, Richard Heyes wrote:
> Marcus Bointon wrote:
>> The PEAR rfc822 class is pretty good, but it should be noted it's
>> designed for parsing entire to, cc, bcc fields which may contain
>> multiple addresses, and it's not quite as simple as asking it 'is
>> this
>> add
On 3 Nov 2005, at 14:16, Richard Heyes wrote:
It even has a method specifically for "normal" email addresses of
the form [EMAIL PROTECTED]
Ah, well, that's good news. It's been a while since I looked at it.
Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
[EMAIL PROT
Marcus Bointon wrote:
The PEAR rfc822 class is pretty good, but it should be noted it's
designed for parsing entire to, cc, bcc fields which may contain
multiple addresses, and it's not quite as simple as asking it 'is this
address ok'.
News to me...
if (!PEAR::isError(Mail_RFC822::parseA
On 3 Nov 2005, at 04:32, viraj wrote:
does PHP really needs a function to validate an email address!! i
doubt. because PHP is a language which provides number of string
functions with regex capabilities to develop what ever pattern
matching you want.
Writing a regex for RFC2822 is not easy - t
Curt Zirzow wrote:
On Wed, 02 Nov 2005 21:19:24 +0100, Jochem Maas wrote:
I totally agree with Richard. about the need for a php func for checking a
correct email addr.
given that php 'is all about the web', idealogically (still?) pragmatic
and dynamically typed:
is_email_addr() or is_email(
On Thu, 03 Nov 2005 13:42:34 +1000, Ligaya Turmelle wrote:
>
>>There already is:
>> http://php.net/imap_rfc822_parse_adrlist
>>
>>
> quote from user contributed notes:
>
> "| This function does NOT test the syntax of either the local part, or the
> host part, it will permit illegal characte
On Thu, 2005-11-03 at 10:32 +0600, viraj wrote:
> second point is, different organizations have different policies on
> validating email addresses
RFC822 Section 6.1 provides the standard (policy).
--
Greg Donald
Zend Certified Engineer
MySQL Core Certification
http://destiney.com/
--
PHP Gen
dear all,
does PHP really needs a function to validate an email address!! i
doubt. because PHP is a language which provides number of string
functions with regex capabilities to develop what ever pattern
matching you want.
second point is, different organizations have different policies on
validat
There already is:
http://php.net/imap_rfc822_parse_adrlist
quote from user contributed notes:
"| This function does NOT test the syntax of either the local part, or
the host part, it will permit illegal characters on either side."|
--
Respectfully,
Ligaya Turmelle
"Life is a game s
James Benson wrote:
Would it not be better something like valid_email()
sounds fine. call it what you like. :-)
Reason:
The is_* family check for a variable type so dont think that it really
fits into the same catagory.
twas a long shot ;-)
James
Jochem Maas wrote:
I totally agr
11 matches
Mail list logo