WordPress Form To Email.php and Theme
You need to include the wordpress config file: require $_SERVER[‘DOCUMENT_ROOT’].’/wp-config.php’; OR use a page template if your form handler is in your theme. Take a look at using page template’s in wordpress: http://codex.wordpress.org/Page_Templates