I know this e-mail address works, because I send mail to myself on it. So why does this code not do what I think it should:
$email = 'enquiry_b337575afd6632d06ea58b9b088f35ee6c5682ba5ec768bf3b80c07db2da257d@uat.abc.com';
if (filter_var($email, FILTER_VALIDATE_EMAIL))
{
print 'is valid';
}
else
{
print 'is not valid';
}
It prints "is not valid". But I'm pretty sure that e-mail address is correct. Is it perhaps too long and they check for some specific length? Because the last time I checked an e-mail address can be up to 255 characters in length.
Anyone know why this is happening?
UPDATE 1
If I shorted it to this:
$email = 'enquiry_b337575afd6632d06ea58b9b088f35ee6c5682ba5ec768bf3b80c07d@uat.abc.com';
Then it works. So there must be some kind of max length kicking in...