%%[[if edit]]%%
%[if %("%id=mail_handling%" == "formspree")% ]%
Important - this mail handling type is now depreciated. Legacy forms that identify themselves with an email address are no longer supported by Formspree. To continue using Formspree and receiving emails, you must switch to using 'Formspree (default)' in the stack settings. Login to your Formspree account and generate a new form. Copy the endpoint URL into the stack settings.
%[endif]%
%%[[endif]]%%
%%[[if !edit]]%%
%[if %("%id=mail_handling%" == "php_mail")% ]%
$value) {
$message .= ''.$name.':
'.$value.'
';
}
%[endif]%
%[if %("%id=php_mail_format%" == "json")% ]%
// Send message as a JSON object
$message = json_encode($theFormData);
%[endif]%
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Create email headers
$headers .= 'From: '.$from_email."\r\n".
'Reply-To: '.$from_email."\r\n" .
'X-Mailer: PHP/' . phpversion();
if ($bot_test) {
echo '';
}
else {
mail($to, $subject, $message, $headers);
echo '';
}
}
?>
%[endif]%
%[if %("%id=spam_protection%" == "botpoison")% ]%
%[endif]%
%[if %("%id=mail_handling%" == "custom")% ]%
%id=custom_handling_code%
%[endif]%
%[if %("%id=mail_handling%" == "formbucket")% ]%
%%[[endif]]%%
%%[[if edit]]%%
%[if %("%id=spam_protection%" == "akismet")% ]%
Some important notes about Akismet
- Akismet is only supported by Formspark.
- As of September 2021, Akismet is pre-activated for all accounts.
- No further configuration is required, if the mail handling is set to 'Formspark'.
%[endif]%
%[if %("%id=spam_protection%" == "botpoison")% ]%
Some important notes about Botpoison
- This method of spam protection requires that the service you are sending form data to for processing (like Formspark) also supports Botpoison.
- Not all mail handling services support Botpoison. If the service does not support Botpoison, then no spam protection gets applied.
- You must setup Botpoison on the Botpoison website, in order to obtain a public key (also known as a site key) and a secret key. Go to https://botpoison.com/start/ to do this.
- The Botpoison site key goes into the Formulate settings. The secret key is given to your form processing service and goes in their anti-spam settings.
- With Botpoison enabled, you have to load extra code from the Botpoison website. This may add a few extra megabytes to the page size. To satisfy important privacy laws, you may need to conditionally load Formulate using a stack like CookieManager or MiniCookie. In other words, only load the form after a user has given their consent to third-party Botpoison tracking.
- Botpoison is an invisible, anti-spam solution. You will only be able to see it in the browser developer tools or confirm it's working from your mail handling service.
%[endif]%
%[if %("%id=spam_protection%" == "recaptcha2")% ]%
Some important notes about reCAPTCHA v2
- reCAPTCHA v2 displays either a visible 'I am not a robot' checkbox or a picture puzzle, within a challenge box, above your submit button.
- This method of spam protection requires that the service you are sending form data to for processing (like Formspark) also supports reCAPTCHA.
- Not all mail handling services support reCAPTCHA. If the service does not support reCAPTCHA, then no spam protection gets applied.
- You must setup reCAPTCHA on the Google website, in order to obtain a site key and a secret key. Go to https://developers.google.com/recaptcha/ to do this.
- The reCAPTCHA site key goes into the Formulate settings. The secret key is given to your form processing service and goes in their anti-spam settings.
- With reCAPTCHA enabled, you have to load extra code from the Google website. This may add a few extra megabytes to the page size. To satisfy important privacy laws, you may need to conditionally load Formulate using a stack like CookieManager or MiniCookie. In other words, only load the form after a user has given their consent to third-party Google tracking.
- Use the
.g-recaptcha
class selector name, if you need to write CSS code to adjust the placement of your reCAPTCHA challenge box. This may be required in some RapidWeaver themes.
%[endif]%
%[if %("%id=spam_protection%" == "recaptcha3")% ]%
Some important notes about reCAPTCHA v3
- reCAPTCHA v3 uses a system of 'scoring' website users and is invisible. Scoring involves tracking a user to monitor things like scrolling and typing speed. Only a badge is shown at the bottom right of the published page.
- This method of spam protection requires that the service you are sending form data to for processing (like Formspark) also supports reCAPTCHA.
- Not all mail handling services support reCAPTCHA. If the service does not support reCAPTCHA, then no spam protection gets applied.
- You must setup reCAPTCHA on the Google website, in order to obtain a site key and a secret key. Go to https://developers.google.com/recaptcha/ to do this.
- The reCAPTCHA site key goes into the Formulate settings. The secret key is given to your form processing service and goes in their anti-spam settings.
- With reCAPTCHA enabled, you have to load extra code from the Google website. This may add a few extra megabytes to the page size. To satisfy important privacy laws, you may need to conditionally load Formulate using a stack like CookieManager or MiniCookie. In other words, only load the form after a user has given their consent to third-party Google tracking.
%[endif]%
%%[[endif]]%%
%%[[if !edit]]%%
This webpage uses the free demo version of %stackTitle% v%stackVersion%
%%[[endif]]%%