在我的客户网站上有一个联系表格。尽管已经实施了多项反垃圾邮件措施,但他们表示他们正在收集大量垃圾邮件。
前端表格:
<p class="st-address"><i class="fa fa-map-marker"></i>COMPANY<br/>Office<br/>Something Road<br/>Town<br/>Postcode</p>
<p class="st-phone"><i class="fa fa-mobile"></i>123456</p>
<p class="st-email"><i class="fa fa-envelope-o"></i>
<script type="text/javascript">
var first = "info";
var last = "something.com";
document.write(first + '@' + last);
</script>
</p>
<form action="php/send-contact.php" class="contact-form" name="contact-form" method="post">
<input type="text" name="name" required="required" placeholder="Name*">
<input type="email" name="email" required="required" placeholder="Email*">
<p class="antispam"> <input type="text" name="url"/></p>
<input type="text" name="subject" placeholder="Site" required="required">
<textarea name="message" required="required" cols="30" rows="7" placeholder="Message*">Home</textarea>
<input type="submit" name="submit" value="Send Message" class="btn btn-send">
</form>
PHP:
if(isset($_POST['url']) && $_POST['url'] == '' ){
$name = @trim(stripslashes($_POST['name']));
$email = @trim(stripslashes($_POST['email']));
$subject = @trim(stripslashes($_POST['subject']));
$message = @trim(stripslashes($_POST['message']));
$email_from = $email;
$email_to = 'hello@email.com';
$body = 'Name: ' . $name . "\n\n" . 'Email: ' . $email . "\n\n" . 'Subject: ' . $subject . "\n\n" . 'Site: ' . $website . "\n\n" . 'Message: ' . $message;
$success = @mail($email_to, $body, 'Name: ' . $name . "\n\n" . 'Email: ' . $email . "\n\n" . 'Subject: ' . $subject . "\n\n" . 'Site: ' . $website . "\n\n" . 'Message: ' . $message);
}
?>
我将电子邮件地址更改为我自己以接收垃圾邮件,以查看它们是否来自特定页面(我暂时将该页面的名称作为值放在了...)我有没有收到垃圾邮件。
在我将电子邮件地址更改为我自己的电子邮件地址之前,客户端收到一条消息值,表明它来自主页,所以它肯定是来自联系表单的垃圾邮件,但我收到的字面上没什么,也不知道为什么。我的垃圾邮件文件夹中也没有任何内容。
任何有关为何发生这种情况的建议?