Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > RocketCake
Spam via the contact form

termalert
Registered User
Quote
2017-09-12 09:39:34

Hi guys. I am about to become a rocketcake convert.
Has the solution above solved the spambot problem ?


johannes
Registered User
Quote
2018-12-12 15:42:53

Works fine. Thank you


darran
Registered User
Quote
2019-02-13 11:24:52

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>";



niko
Moderator
Quote
2019-02-15 08:35:46

No, I think that problem is just gmail. They have an awful spam filter which does that. Better disable it, if that is possible.


darran
Registered User
Quote
2019-02-15 13:01:52

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


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Int?rnational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact