mail address validation
does anybody know a function in php4 to easily validate if an email adress give by the user is in the valid [EMAIL PROTECTED] form? or did anybody ever write a function for doing that and is willing to share it with me? thxs Michael
RE: mail address validation
on http://developer.netscape.com, you can find a set of javascript function to check a form. These function are based on regular expression that can be reused with PHP. So, let's go to http://developer.netscape.com/docs/examples/index.html?content=javascript.ht ml and then click on Form Validation with JavaScript 1.2 Regular Expressions I think you'll find what you're looking for Pascal Thivent Groupe SQLI Web : http://www.sqli.com Mail : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Tel : 01 55 93 25 36 -Message d'origine- De: Michael Buerkle [mailto:[EMAIL PROTECTED] Date: lundi 27 novembre 2000 15:09 À: debian-user@lists.debian.org Objet: mail address validation does anybody know a function in php4 to easily validate if an email adress give by the user is in the valid [EMAIL PROTECTED] form? or did anybody ever write a function for doing that and is willing to share it with me? thxs Michael -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: mail address validation
[EMAIL PROTECTED] wrote: does anybody know a function in php4 to easily validate if an email adress give by the user is in the valid [EMAIL PROTECTED] form? or did anybody ever write a function for doing that and is willing to share it with me? Disclaimer: I don't know PHP, but ... The standard answer when people ask how to do this in Perl is don't. RFC 822 is evil to parse, and the work involved in doing that doesn't actually give you a great deal of benefit. After all, most addresses that look valid won't be deliverable anyway. The only way to tell if an address is deliverable is really to try sending something to it. Have I misunderstood why you need this? -- Colin Watson [EMAIL PROTECTED]
Re: mail address validation
On Mon, 27 Nov 2000 16:25:18 GMT, Colin Watson writes: [EMAIL PROTECTED] wrote: does anybody know a function in php4 to easily validate if an email adress give by the user is in the valid [EMAIL PROTECTED] form? or did anybody ever write a function for doing that and is willing to share it with me? Disclaimer: I don't know PHP, but ... The standard answer when people ask how to do this in Perl is don't. Let sendmail do it for you: call sendmail as an external program and parse the output [waldner:~] sendmail -bv [EMAIL PROTECTED] [EMAIL PROTECTED] deliverable: mailer esmtp, host \ flatline.org.uk., user [EMAIL PROTECTED] just my 2 cents, rw -- / Ing. Robert Waldner | Network Engineer | T: +43 1 89933 F: x533 \ \ [EMAIL PROTECTED] |KPNQwest/AT | Diefenbachg. 35, A-1150 /
Re: mail address validation
Pascal THIVENT [EMAIL PROTECTED] wrote: on http://developer.netscape.com, you can find a set of javascript function to check a form. These function are based on regular expression that can be reused with PHP. So, let's go to http://developer.netscape.com/docs/examples/index.html?content=javascript.ht ml and then click on Form Validation with JavaScript 1.2 Regular Expressions I think you'll find what you're looking for Oh dear. That's really quite a poor regex for e-mail addresses. It's quite happy to accept 'this is not [EMAIL PROTECTED]', for instance. The Perl Mail::Address module, in the mailtools package, does a somewhat better job. -- Colin Watson [EMAIL PROTECTED]