我有以下表格:
<form action="" method="post" enctype="multipart/form-data">
<input required="required" name="name" type="text" placeholder="Name" /><br /><br />
<input required="required" name="email" type="text" placeholder="Email" /><br /><br />
<input required="required" name="phone" type="text" placeholder="Phone Number" /><br /><br />
<input required="required" name="website" type="text" placeholder="URL to blog / website" /><br /><br />
<input type="file" name="file" /><br /><br />
<textarea name="message" cols="" rows="10" placeholder="Message (optional)"></textarea><br /><br />
<input name="send_form" type="submit" value="Submit" style="float:right; width:200px;" />
</form>
这是我的 php:
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Host = "xxxxxx"; // sets the SMTP server
$mail->Username = "xxxxxxx";// SMTP account username
$mail->Password = "xxxx"; // SMTP account password
$mail->From = $_REQUEST['email'];
$mail->FromName = $_REQUEST['name'];
$mail->IsHTML(true);
$mail->Subject = "CV Upload";
$body = 'Name:'.$_REQUEST['name'].'<br /><br />Email:'.$_REQUEST['email'].'<br /><br />Email:'.$_REQUEST['website'].'<br /><br />Message:'.$_REQUEST['message'].'<br /><br />';
$mail->Body = $body;
$mail->AltBody = $text_body;
$mail->AddAddress("danyob@rbh.co.uk");
$mail->AddAttachment($_FILES['file']['tmp_name'], $_FILES['file']['name']);
if($mail->Send()){
$success = true;
}else{
$success = false;
}//if($mail->Send()){}
由于某种原因,我收到的电子邮件中没有显示内容的正文。主题行和其他一切都有效。以上有什么问题吗?