這裏是我的郵件發送代碼:每次我的郵件進入垃圾郵件中的PHPMailer
$fullname = $_POST['fullname'];
$email = $_POST['email'];
$telephone = $_POST['telephone'];
$email = $_POST['email'];
$date = $_POST['date'];
$time = $_POST['time'];
$adult = $_POST['adult'];
$children = $_POST['children'];
$company_name = $_POST['company_name'];
$addition = $_POST['addition'];
$confirm = $_POST['confirm'];
$body = '
<table width="100%" border="0" cellpadding="0">
<tr>
<td>Dear Sir,
</td>
</tr>
<tr>
<td><b>Booking request from '.$fullname .'</b><br /><br />
<u>The details provided are:</u><br />
<p>Name : '.$fullname.'<br />
E-mail Address: '.$email.'<br />
Telephone: '.$telephone.'<br />
Date: '.$date.'<br />
Time: '.$time.'<br />
Adult: '.$adult.'<br />
Children: '.$children.'<br />
Company Name: '.$company_name.'<br />
Confirm by: '.$confirm .'<br />
Additional Requirements: '.$addition.'<br />
</p>
</td>
</tr>
<tr>
<td>
<p>Thank you,<br />
Kaavya Cuisine
</p></td>
</tr>
</table>
';
$to = '[email protected]';
$subject = 'Booking Request';
$sitename='Website Name';
$mail = new PHPMailer();
$mail->AddReplyTo($to,$sitename);
$mail->SetFrom($email,$fullname);
$mail->AddAddress($to, $sitename);
$mail->Subject = $subject;
$mail->MsgHTML($body);
$mail->Send();
我每次發送郵件,它會在垃圾郵件。有誰知道爲什麼會發生這種情況?
這個問題可能在您的郵件客戶端 – 2012-04-03 06:46:04
我甚至嘗試用我的真正的Hotmail地址.... $ email ='[email protected]'; – sujal 2012-04-03 06:48:04
請提供一些更多信息......您想從哪裏發送此電子郵件?您是否嘗試使用該機器上的命令行發送郵件? – SimonSimCity 2012-04-03 06:56:25