이것은 내 코드입니다. ID를 가진 이드에게 이메일을 보낼 때 이메일은 쓰레기로 간다. 이 코드의 문제점을 식별 할 수 없습니다. 예를 들면 다음과 같은 이메일을 보냅니다.메일이받은 편지함으로 직접 보내지지 않습니다.
보낸 사람 : [email protected] To = [email protected] 그런 다음 바로 정크 메일이 발송됩니다.
<?php
$name=$_POST['fName'];
$yemail = $_POST['yEmail'];
$femail=$_POST['fEmail'];
$message=$_POST['message'];
$from=$yemail;
$to=$femail;
$subject="Invitation for you";
$mailBody ="<table width='628' border='0'>
<tr><td align='left' valign='middle'><p><br><br>Hello,<br><br>This email is a notification to let you know that your friend has invited you to <br>visit this link <a href=www.heed-association.org>Heed Association.</a><br><br> Your friend is using this to help people living in Pakistan by donating some money.<br><br>So your can also contribute in the areas of Health, Education, Environment and Sustainable Development<br> in the earthquake affected areas of Kashmir to improve living conditions and alleviate community distress<br><br><hr><br><br><strong>Regards<br><br>Heed Association</p></td></tr></table>";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: <'.$yemail.'>' . "\r\n";
if (mail($to, $subject, $mailBody, $headers)) {
echo "<script language='javascript'>
window.location = 'index.php';
</script>";
} else {
echo "<script language='javascript'>
window.location = 'tell_a_form.php';
</script>";
}
?>
이것은 야후의 스팸 필터와 관련이있는 것으로 보인다. 보낸 사람 필드에 스팸이받는 사람의 주소를 포함하는 것은 드문 일이 아니므로 야후가 반응하는 것일 수 있습니다. – Barmar
mail()을 사용하여 보내지는 메일은 스팸으로 처리되는 경우에도 매우 일반적입니다. 그것은 메일을 보내는 좋은 방법이 아닙니다. phpmailer 나 swiftmailer와 같은보다 완벽한 시스템을 사용하십시오. –