我具有SMTP邮件发送功能
$mail->IsSMTP();
$mail->SMTPDebug = 0;
$mail->SMTPAuth = TRUE;
$mail->SMTPSecure = "ssl";
$mail->Port = 465;
$mail->Username = "abc@gmail.com";
$mail->Password = "*****";
$mail->Host = "smtp.gmail.com";
$mail->Mailer = "smtp";
$mail->SetFrom("abc@mjsofttech.com", 'Admin');
$mail->AddReplyTo("abc@mjsofttech.com", 'Admin');
$mail->AddAddress($_POST['email']);
$mail->Subject = $subject;
$mail->WordWrap = 80;
$mail->MsgHTML($msg);
$mail->IsHTML(true);
if (!$mail->Send()) {
$this->view->status = 'invalid';
}
此代码适用于xyz@gmail.com之类的Gmail地址,但无法正常工作意味着我收到了发送成功的邮件邮件,但获取邮件却滞后。像xyz@company.com这样的网络邮件地址需要花费很长时间,但是对于Gmail地址,我会立即得到。请帮我。为什么会这样?任何帮助将不胜感激