简体   繁体   English

发送的电子邮件会延迟几个小时到达

[英]Sent email arrives with few hours delay

This is my email sending code: 这是我的电子邮件发送代码:

if(isset($_POST['contactname']) && isset($_POST['email']) && isset($_POST['message'])) {
  $contactname = $_POST['contactname'];
  $email = $_POST['email'];
  $message = $_POST['message'];
  $subject = "Ձեզ գրել են ձեր կայքից";
  $to = "stereoshoots@gmail.com";
  $headers = "From: ".$email;
  mail($to,$subject,"Ձեզ գրել է: $contactname \n $message",$headers);
  echo "E-mail-ը հաջողությամբ ուղարկվեց";
}
else if(empty($_POST['contactname']) && empty($_POST['email']) && empty($_POST['message'])) {
  "erroooor";
}

Everything is ok there, everything works without any errors, but the email is coming after few hours. 一切正常,一切正常,没有任何错误,但是几小时后电子邮件就来了。 How can I fix this? 我怎样才能解决这个问题?

如果发送了电子邮件,但要花费几个小时才能到达某人的收件箱,则问题出在邮件服务器上,而不是您的应用程序上。

1.View the "Email Header." 1.查看"Email Header."

2.Review the "Received By" email server to determine the location/IP address causing the email delay. 2.查看"Received By"收件人"Received By"电子邮件服务器,以确定导致电子邮件延迟的位置/ IP地址。

The delay is not because of code. 延迟不是因为代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM