When you ask for a sample php script with the mail() function, are you just asking for just any sample script with mail() function? If so, I can send you one with no problem. I have been trying some sample php mail() scripts. Here is a sample I have used from about.com: 1) How_to_Send_Email_from_a_PHP_Script.htm.
The sample I used from about.com works with Yahoo webhosting. I was able to send a successful test run. However, since the script is relatively basic, there appears to be no html function. Is this what you are asking for?