简体   繁体   English

php @mail不发送邮件

[英]php @mail is not sending mail

my php mail function was working fine and sending mail just fine but since past few days it is not sending any emails. 我的PHP邮件功能工作正常,发送邮件就好了,但是过去几天它没有发送任何电子邮件。 i have tested following from whm,php form, cpanel webmail and these are my observations 我已经测试过以下来自whm,php表单,cpanel webmail以及这些是我的观察

when i used cpanel webmail to send emails to my gmail account it got delivered instantly 当我使用cpanel webmail向我的Gmail帐户发送电子邮件时,它立即发送

when i used php simple form to send email it is not delivered then i thought gmail spam filter might be rejecting mails then i checked the whatismyipaddress tool to check whether server ip is marked as spam it showed all green.then i tried for other hotmail and few other id but the mail through php form did not got delivered. 当我使用PHP简单形式发送电子邮件它没有交付然后我认为gmail垃圾邮件过滤器可能拒绝邮件然后我检查了whatismyipaddress工具检查服务器IP是否标记为垃圾邮件它显示所有绿色。然后我尝试其他hotmail和很少有其他的ID,但通过PHP形式的邮件没有交付。 then i checked my php.ini file and its absolutely fine and then i checked whm mail delivery reports(here that email was not appearing) and queue manager(that email was not appearing) and even mail troubleshooter it was green when checked. 然后我检查了我的php.ini文件,它绝对没问题,然后我检查了邮件传递报告(这里没有电子邮件)和队列管理器(电子邮件没有出现)甚至邮件疑难解答它是绿色时检查。

i disabled spamassis of whm then also mail was not delivered.where it is going or where is the problem can anyone give some light 我禁用了spa的spamassis然后也没有发送邮件。它正在发生的地方或问题在哪里可以任何人给予一些光

mail.php mail.php

   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
     <head>
 <title>Send Anonymous Email</title>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 </head>

  <body>
<form name="SAE" method="post" action="send.php">
   <br>To Email: </br>
   <br><input name="toemail" type="text" id="toemail" value=""></br>
<br>Subject: </br>
  <br><input name="subject" type="text" id="subject" value=""></br>
  <br>Message:</br>
 <br> <textarea cols="50" rows="7" name="message"></textarea></br>
<br><input name="submit" type="submit" value="Send!"></br>

 </form>
   <p>Powered by <a href="http://asian.sc">Anonymous Email Sender</a></p>
 </body></html>

send.php send.php

  <?php 



  $toemail = $_POST['toemail']; 
  $subject = $_POST['subject']; 
  $message = $_POST['message']; 

  mail($toemail, '$subject (Sent Anonymously)', "Hello, 
   The following is an anonymous email. 

  $message 

   Powered by http://asian.sc - Anonymous Email Sender", 'From: '.$email); 

      echo "Thank you, $name<br>Message sent to $toemail with the following information:</br>Subject: $subject</br>Message: $message</br><p>Powered by <a href=\"http://asian.sc\">Anonymous Email Sender</a></p>";?>

sorry i forgot to mention that i checked log file for errors but that email was not there 对不起,我忘了提到我检查了日志文件中的错误,但那封电子邮件不存在

This is an attempt of the sendmail to stop sending mail with custom From Headers. 这是sendmail停止使用自定义From Headers发送邮件的尝试。

A quick fix is to use an SMTP server to send mail through ( I advice, using a GMAIL account as it is whitelisted in all most all cases.) 快速解决方法是使用SMTP服务器发送邮件(我的建议,使用GMAIL帐户,因为它在所有情况下都列入白名单。)

Sending emails through SMTP Server Send email using the GMail SMTP server from a PHP page 通过SMTP服务器发送电子邮件使用PHP页面中的GMail SMTP服务器发送电子邮件

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

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