email scrub |
[eluser]infusionmedia[/eluser]
I am currently working on a list management application. I need to be able to segregate email data based on tld, non-tld, .gov, .edu, @spam... I guess my question is, has anybody else worked on something similar that can share some info and/or share some code that I can implement into this application? Thanks...
[eluser]Leggy[/eluser]
You could do a regex to see if it a valid email e.g. (taken from the CI validator class) Code: preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str) There are better ways, i used to have a very good one but i have lost it since. EDIT: I think i found it again, i made a few alterations to the code but here is the function: Code: function check_email( $email, $rec_type = 'MX' )
[eluser]infusionmedia[/eluser]
dude. you are the man, that was very helpful. |
Welcome Guest, Not a member yet? Register Sign In |