Re: [PHP] checking if e-mail address and syntax are valid

2001-05-06 Thread Manuel Lemos
Hello Carlos, On 24-Apr-01 17:12:53, you wrote: I would like to know if anyone has or know any PHP code to verify if a form entered e-mail address is valid? I would like that things like 4$%^%$@@.com.br could not be sent. I only has to verify the syntax of it, the existance I believe should be

Re: [PHP] checking if e-mail address and syntax are valid

2001-04-25 Thread Nikhil Goyal
I wrote a similar script of my own... Works fine for me function email_valid($email) { $pattern=^[0-9a-zA-Z_-]+(\.[0-9a-zA-Z_-]+)*@[0-9a-zA-Z_-]+(\.[0-9a-zA-Z_-]+ )+$; return ereg($pattern, $email); } (returns false if email is not valid, true if it is) N Martin Skjöldebrand [EMAIL

Re: [PHP] checking if e-mail address and syntax are valid

2001-04-25 Thread Dan Lowe
Problem with this is that many people use '+' in email addresses along with other strange characters (a friend of mine has an apostrophe in her address at General Electric). Bottom line, trying to catch all valid email addresses using a regex is a really ugly thing to try to do. The one shown

[PHP] checking if e-mail address and syntax are valid

2001-04-24 Thread Carlos Fernando Scheidecker Antunes
Hello all! I would like to know if anyone has or know any PHP code to verify if a form entered e-mail address is valid? I would like that things like 4$%^%$@@.com.br could not be sent. I only has to verify the syntax of it, the existance I believe should be harder to verify but if it is

Re: [PHP] checking if e-mail address and syntax are valid

2001-04-24 Thread Martin Skjldebrand
Carlos Fernando Scheidecker Antunes wrote: Hello all! I would like to know if anyone has or know any PHP code to verify if a form entered e-mail address is valid? I would like that things like 4$%^%$@@.com.br could not be sent. I only has to verify the syntax of it, the existance I

RE: [PHP] checking if e-mail address and syntax are valid

2001-04-24 Thread christopher hamilton
I'd like to add to that, before someone spends a lifetime searching for an answer ... Solution: There isn't one. You cannot do real-time validation of mail addresses. You must pick from a number of compromises. The section goes on describing how many RFC-valid addresses are undeliverable and

Re: [PHP] checking if e-mail address and syntax are valid

2001-04-24 Thread Sterling
H- If you're wanting to do it *before* the user sends the form than javascript is the way to go. http://developer.irt.org/script/email.htm It's the very first FAQ. #122. -Sterling Carlos Fernando Scheidecker Antunes wrote: Hello all! I would like to know if anyone has or know any PHP

Re: [PHP] checking if e-mail address and syntax are valid

2001-04-24 Thread Szii
Actually, you can check the validity of the SMTP port to semi-validate the domain. The name of the recipient would be harder, but again, through your standard user does not exist error messages/codes, you could tell if the domain is valid, but the user is not. Checking to see if it's

Re: [PHP] checking if e-mail address and syntax are valid

2001-04-24 Thread Plutarck
I'll save everyone the trouble and skip ahead to the anti-climactic end to the email validation problem: you can't. You can filter blatantly invalid email addresses (but do not go strictly from the RFC, because some very weird emails end up being valid regardless). You can resolve hosts. You can

Re: [PHP] checking if e-mail address and syntax are valid

2001-04-24 Thread Felix Kronlage
On Tue, Apr 24, 2001 at 02:33:18PM -0700, Szii wrote: Checking to see if it's syntactically correct is trivial. Validating the domain is rather simple as well (check the retcode on a whois lookup.) Which is not as trivial as it sounds, since whois does not really have return-codes. You