Hi, I’m a complete beginner to PHP and need some help and explanation as to how I can get the attached to arrive into my mailbox marked with the sender’s name rather than my email address. Many thanks in advance for any help.
[php]<?
session_start();
if ($_SERVER[“REQUEST_METHOD”] <> “POST”)
die(“You can only reach this page by posting from the html form”);
if ($_POST[“captcha_input”] == $_SESSION[“pass”])
{
header(“Location: thank_you.html”);
//sends email via php to the following address
$mailuser = "[email protected]";
//echo 'default chosen address: '.$mailuser;
$header = "Return-Path: ".$mailuser."\r\n";
$header .= "From: $myemail\n <".$mailuser.">\r\n";
$header .= "Content-Type: text/html;";
$mail_body = '
Name: '. $_POST[name] . '<br><br>
Email: '. $_POST[email] . '<br><br>
Telephone: '. $_POST[telephone] . '<br><br>
Message: '. $_POST[message] . '<br><br>'
;
mail ($mailuser, 'Contact Form', $mail_body, $header);
} else {
header(“Location: error.html”);
}
?>[/php]