Just wondering why this is too strict, I can send very simplified emails to say [email protected] or [email protected]
but if I make the email any longer ([email protected]) it does not get sent.
Instead it echos back my error message:Invalid Email Address Supplied
// Create a function to check email
function checkEmail($email)
{
// Add some regex
return preg_match('/^\S+@[\w\d.-]{2,}\.[\w]{2,6}$/iU', $email) ? TRUE : FALSE;
}