Is it possible to configure PHP to only send emails created using
mail() to a specific list of whitelisted domains? E.g. An email to firstname.lastname@example.org is sent because domain1.com is on the whitelist but a mail to email@example.com is dropped because domain2.com is not. Even when the email itself is properly formed with correct headers.
PHP version 5.2.17