Hi,
one minor thing:
you somewhere have a colon rather than a semicolon:
another minor thing: the email From header should readCode:<?php get_data("references"):?>
so in php you want to sayCode:From: "Application form" <you@yoursite.com>
Code:$headers = "From: \"Application form\" <you@yoursite.com>";