我收到了来自我的网站联系表单的电子邮件,但没有收到任何内容。
下面是我的代码:
PHP
<?php
$name = @trim(stripslashes($_POST["name"]));
$from = @trim(stripslashes($_POST["email"]));
$subject = @trim(stripslashes($_POST["subject"]));
$message = @trim(stripslashes($_POST["message"]));
// recipient address
$to = "admin@deptfordtechservices.com";
// subject of email
$re = "New Inquiry";
// message creation
$contact = "Name:".$name."'nEmail:".$from."'nSubject:".$subject."'r'n";
$txt = "Message:".$message."'r'n";
$fmsg = $contact."'r'n".$txt;
$msg = wordwrap($fmsg, 70);
// send email
mail($to,$re,$msg);
die;