douli4337 2015-04-22 16:46
浏览 82


I know this has been asked before, but i wanted to show my case because i tried to solve it with other answers but i coundt solve it.

I m trying to do a Contact form but when i choose the email of the receiver if i choose or they dont receive the email. I tried to choose another type of email like gmail, yahoo or terra and the email arrives without problem.

I know it must be because the spam policies of those servers but i dont know how to fix it.

This is my code of the phpMailer:

$mail = new PHPMailer();
$mail->Host = "localhost";
$mail->Hostname = "Advanced Institute";
$mail->From = $_POST["email"];
$mail->FromName = $_POST["email"];
$mail->Subject = "Quiero contactarme con Advanced Institute";
$mail->AddAddress("","Advanced Institute");
$mail->IsHTML(true); // El correo se envía como HTML
$body = '<html><body><div>Nombre : '.$_POST["nombre"].'<br>  Email :    '.$_POST["email"].'<br>  Telefono : '.$_POST["telefono"].'<br>  Asunto : '.$_POST["asunto"].'<br>  Comentarios:           '.$_POST["comentarios"].'<br> </div></body></html>';
$mail->Body = $body;    
    if(!$mail->Body) {
        echo 'Error: ' . $mail->ErrorInfo;

I hope my english was enough for you guys to understand my problem. THANK YOU IN ADVANCED

  • 写回答

1条回答 默认 最新

  • doubo1711 2015-04-22 16:52

    You probably need to set up SPF records for the domain name.

    Further information:

    Recommended SPF Wizard

    Also the from address should be from the sending domain name, not user input.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?



  • ¥15 vue2中使用计算属性
  • ¥50 远程桌面打开Mastercam、没有许可证、物理机打开正常
  • ¥15 ubuntu安装gdal后java读取tif文件报错
  • ¥15 请问lammps怎么做两种金属连接的原子浓度分布图
  • ¥15 求jacquard数据集
  • ¥15 w10部分软件不能联网
  • ¥15 关于安装hbase的问题(操作系统-windows)
  • ¥15 novnc连接pve虚拟机报错安全协议不支持262
  • ¥15 设备精度0.03给多少公差能达到CPK1.33
  • ¥15 qt+ffmpeg报错non-existing PPS 0 referenced