PHP邮箱钓鱼,PHP邮件导致gmail上的网络钓鱼警告

我正在使用PHPMailer从我的网站发送自动电子邮件,在测试时,我注意到当我通过Gmail从网站发送邮件时,php邮件发送的电子邮件在收件人端产生以下警告:此消息可能尚未发送者:example@gmail.com了解更多报告网络钓鱼 . 但是当我使用其他电子邮件(如雅虎,Outlook)时,我的 $contact_email 中没有收到任何电子邮件 . 请帮我解决这个问题 .

PHP邮件代码:

global $_REQUEST;

$response = array('error'=>'');

$user_name = substr($_REQUEST['user_name'], 0, 20);

$user_email = substr($_REQUEST['user_email'], 0, 40);

$user_msg = $_REQUEST['user_msg'];

$contact_email = 'contact.arefin@gmail.com';

if (trim($contact_email)!='') {

$subj = 'Message from Official Website';

$msg = "Name: $user_name

E-mail: $user_email

Message: $user_msg";

$head = "Content-Type: text/plain; charset=\"utf-8\"\n"

. "X-Mailer: PHP/" . phpversion() . "\n"

. "Reply-To: $user_email\n"

. "To: $contact_email\n"

. "From: $user_email\n";

if (!@mail($contact_email, $subj, $msg, $head)) {

$response['error'] = 'Error send message!';

}

} else

$response['error'] = 'Error send message!';

echo json_encode($response);

die();

?>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值