Ambiera ForumDiscussions, Help and Support. |
|
[ 1 2 ] Page 2 of 2 |
|
|||||
|
Hi guys. I am about to become a rocketcake convert. Has the solution above solved the spambot problem ? |
||||
|
Works fine. Thank you |
||||
|
Thanks for the additional verification code, that works great. The problem I have is that the emails are being delivered to Spam folder in my hotmail account and not delivered at all to my gmail account. I am assuming that it is because the email does not contain an originating email address is there a way to adapt the php to send email using my domain as the originator, so I see that email comes from my domain, or to include the address of the person who completed form? here is code as I have it now $text = ""; foreach($_POST as $name => $value) { $text .= "$name : $value\n"; } if ($text != "" && $_POST["verification"] == "human") { echo "<p> <font color=white font face='Abel'>Thank you for your enquiry, we will contact you soon</font> </p>"; mail("myemail@myemail.com", "Website Enquiry", $text); } else if ($text != "") echo "<p> <font color=white font face='Abel'>Please enter the word human in the verification field, Thanks</font> </p>"; I tried and failed with following, which broke functionality $name = $_POST['name'];
$email = $_POST['email']; $phone = $_POST['telephone']; $message = $_POST['message']; $formcontent=" From: $name \n Phone: $phone \n Email: $email \n Message: $message"; $recipient = "myemail@myemail.com"; $subject = "website enquiry"; $mailheader = "From: $email \r\n"; if ($verification = "human") { echo "<p> <font color=white font face='Abel'>Thank you for your enquiry, we will contact you soon</font> </p>"; mail($recipient, $subject, $formcontent, $mailheader); } else if ($verification = "") echo "<p> <font color=white font face='Abel'>Please enter the word human in the verification field, Thanks</font> </p>"; |
||||
|
No, I think that problem is just gmail. They have an awful spam filter which does that. Better disable it, if that is possible. |
||||
|
The answer to problem was much simpler than I thought. I hope this helps anyone who is experiencing similar problem I added the following From: myemail@myemail.com into mail section $text = ""; foreach($_POST as $name => $value) { $text .= "$name : $value\n"; } if ($text != "" && $_POST["verification"] == "human") { echo "<p> <font color=white font face='Abel'>Thank you for your enquiry, we will contact you soon</font> </p>"; mail("myemail@myemail.com", "Website Enquiry", $text, From: myemail@myemail.com ); } else if ($text != "") echo "<p> <font color=white font face='Abel'>Please enter the word human in the verification field, Thanks</font> </p>"; This then allowed me to add exception in hotmail to stop it from hitting junk, also delivered to gmail account. D |
[ 1 2 ] Page 2 of 2 |
|