One (naive?) way to get the domain of the e-mail address might be something like:
list(, $domain) = explode("@", $email_address);
You could then compare $domain to an array of domains (e.g. using [man]in_array/man) and stop processing the data if a match is found.
However, if your goal is to block all public/free e-mail providers, know that doing so is most likely going to be prohibitively difficult.