为网站设置了一个系统,使用PHPMailer向公司员工发送邮件,但是电子邮件不会进入使用Gmail的收件箱,它会被存储在促销活动中 - TAB ...
邮件是使用雅虎帐户发送的。
请参阅我的代码
require_once('pm/PHPMailerAutoload.php');
$username ="xxxxxxxs@yahoo.com";
$password="pwdxxxx";
$senderName ="COMPANY NAME HERE";
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->SMTPSecure = "tls";
$mail->Host = "smtp.mail.yahoo.com";
$mail->Port = 587;
$mail->Username = $username;
$mail->Password = $password;
$mail->SMTPKeepAlive = true;
// Build the message
$mail->Subject = 'Urgent Meeting at the Director's Officie';
$mail->From = $username;
$mail->FromName = $senderName;
$mail->AddReplyTo('xxxxx@gmail.com','COMPANY NAME HERE');
$mail->AddAddress($user_data["Email_Add"],$user_data["Staff_Name"]);
/*
ooooooooooooooooooooooooooo
ooooooooooooooooooooooooooo
0000---MESSAGE-STARTS--oooo
ooooooooooooooooooooooooooo
ooooooooooooooooooooooooooo
*/
$mail->msgHTML('
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Urgent Meeting at the Director's Office</title>
</head>
<body>
<div style="width:100%;" align="center">
There is an Urgent meeting at the Director's Office. All stuffs MUST be there. in 30Mins
</div>
</body>
</html>
');
/*
ooooooooooooooooooooooooooo
ooooooooooooooooooooooooooo
0000---MESSAGE-ENDS-ooooooo
ooooooooooooooooooooooooooo
ooooooooooooooooooooooooooo
*/
if(!$mail->Send()) {
echo 'Failed';
}
else {
echo 'Sent well';
}
$mail->SmtpClose();
如果收到收件箱,我该怎么办?...请帮助thanx