PHP의 mail() 함수를 사용하여 내 웹 사이트에서 자동화 된 전자 메일을 보내고 테스트하는 동안 Gmail에서 웹 사이트에서 메일을 보낸 다음 전자 메일 php mailer에서 보낸 사람이받는 사람에 대해 다음 경고를 보내고 있습니다.이 메시지는 보낸 사람이 아닙니다. [email protected] 자세한 내용 피싱 신고. 그러나 다른 전자 메일 (예 : Outlook)을 사용하면 $ contact_email에 전자 메일이 없습니다. 이 문제를 해결하도록 도와주세요.PHP의 mail() 함수가 제대로 작동하지 않습니다.
** Google 앱을 사용하고 싶지 않습니다. 내 도메인 이메일 주소. ** 나는 단지 원하는 사람이 (양식을 작성하여) 연락을하면 내 웹 사이트에서 이메일을 받았습니다. 다음 코드 :
<?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();
?>
공식 Gmail 주소가 아닌 Gmail 주소에서 이메일을 보내고 있습니다. 그러면 Google에서 이메일을 신고하여 해당 이메일을 가장 한 것입니다. Yahoo/Outlook이 자동으로 이메일을 삭제할 수 있습니다. – Grice
그냥 문의 양식 인 경우 'mailto'에 제출하는 HTML 양식을 사용할 수 없습니까? – muttley91