duanbu9345 2015-08-01 17:15
浏览 65

电子邮件表单不发送邮件

I'm trying to set up the contact form of my site. The script uses the template contact_me.php. The relevant excerpt of the form here:

// create email body and send it    
$to = 'jose.alberto.lara@gmail.com'; // PUT YOUR EMAIL ADDRESS HERE
$email_subject = "Contacto con Ecopolíticas:  $name"; // EDIT THE EMAIL SUBJECT LINE HERE
$email_body = "You have received a new message from your website's contact form.

"."Here 
are the details:

Name: $name

Phone: $phone

Email: 
$email_address

Message:
$message";
$headers = "From: noreply@ecopoliticas.com
";
$headers .= "Reply-To: $email_address"; 
mail($to,$email_subject,$email_body,$headers);
return true;

When I fill the form it seems to work; however, I don't receive any mail.

  • 写回答

3条回答 默认 最新

  • duanmi4379 2015-08-01 17:19
    关注

    Remove the dot (.) in:

    $headers .= "Reply-To: $email_address";
    
    评论

报告相同问题?

悬赏问题

  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测