Ok, I'm not entirely sure how you have php enabled emails, but you can do something similar using a combination of javascript and php. What you can do is use
<script src="http://domain.com/script.php">
and then have the php output javascript, i.e. if you want to write something to the email you would have something like this:
echo "document.write('some text');";
inside the script.php file.