简体   繁体   English

PHP电子邮件发送问题

[英]PHP email sending issue

My contact form is sending emails out but for someone reason, I am not receiving emails in my gmail account. 我的联系表单正在发送电子邮件,但是由于某些原因,我的Gmail帐户没有收到电子邮件。 I am receiving emails on other email providers like Yahoo. 我正在接收其他电子邮件提供商(例如Yahoo)上的电子邮件。 So I think that there is a problem with my headers. 因此,我认为标头存在问题。

$headers = 'From: ' .$email . "\r\n" .
'Reply-To: ' .$email . "\r\n" .
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

You have a period instead of a semi-colon 您使用句号而不是分号

'Reply-To: ' .$email . "\r\n" .
                              ^

Change it to: 更改为:

$headers = 'From: ' .$email . "\r\n" .
'Reply-To: ' .$email . "\r\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

which is breaking your headers 这打破了你的头

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

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