PHPMailer를 사용하여 웹 사이트에서 자동 이메일을 보내고 테스트하는 동안 Gmail 웹 사이트에서 메일을 보내면 PHP 메일러에서 보낸 전자 메일이 받는 사람에 대한 경고 다음 끝 : 이 메시지는 보낸 사람이 아닙니다. [email protected] 자세한 내용 피싱 신고. 그러나 다른 전자 메일 (예 : Outlook)을 사용하면 내 $contact_email
에 전자 메일이 없습니다. 이 문제를 해결하도록 도와주세요.PHP 메일로 Gmail에 피싱 경고가 발생했습니다.
PHP 메일러 코드 :
<?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 = '[email protected]';
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 ([email protected]($contact_email, $subj, $msg, $head)) {
$response['error'] = 'Error send message!';
}
} else
$response['error'] = 'Error send message!';
echo json_encode($response);
die();
?>
이것은 PHPMailer와는 아무런 관련이 없습니다. PHP의'mail()'함수를 사용하고 있습니다 ... –