How can I use get_bloginfo('admin_email') in a custom PHP file located in the parent theme root directory?
I've built a custom form and a PHP mail script separately, but now I'd like to send the form data to the WP Admin email address with Bcc.
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers .= 'From: <[email protected]>' . "\r\n";
$headers .= 'Bcc: <'. get_bloginfo('admin_email');'>'. "\r\n";
mail("[email protected]","Form Application",$admin_email_body,$headers);
Do I need to include Wordpress functions in the PHP file?
Thanks