我已经创建了一个联系表单,我希望在单击提交按钮后将详细信息发送到我的收件箱。单击提交按钮会打开一个新的邮件页面(参见 getfreepack.org)。我被告知我需要一个 PHP 脚本。我从网上复制了一个,但不太清楚如何利用它来发挥我的优势。我会很感激你的帮助。
$Name= $_REQUEST["Name"];
$Email = $_REQUEST["Email"];
$Phone = $_REQUEST["Phone"];
$JobTitle = $_REQUEST["Jobtitle"];
$KeySkills = $_REQUEST["Keyskills"];
$Attachment = $_REQUEST["Attachment"];
$to = "my email address@mail.com";
$subject = "Contact Form";
$message = "Name: " . $Name $message .= "\Email: " . $Email: $message .= "\n Phone: " . $ Phone;
$message .= "\nSubject: " . $Subject; $message .= "\nCover Letter: " . $CoverLetter;
$message .= "\n Attachment: " . $Attachment; $message .= "\nIP Adress: " . $_SERVER['REMOTE_ADDR'];
$message .= "\nBrowser: " . $_SERVER['HTTP_USER_AGENT'];
$message .= "\n\nMessage: " . $theMessage;
$headers = "From: $theEmail";
$headers .= "\nReply-To: $theEmail";
$sentOk = mail($to,$subject,$message,$headers);
echo "sentOk=" . $sentOk;