hammering down PHP

Moved PHP to own file (mail.php) for organizing. Still unsure of how to
connect all the necessary parts especially the poll.