Skip to content

Instantly share code, notes, and snippets.

@JayHoltslander
Created May 9, 2025 18:16
Show Gist options
  • Save JayHoltslander/718eb74ca94ed22c7f07c4fab71b9504 to your computer and use it in GitHub Desktop.
Save JayHoltslander/718eb74ca94ed22c7f07c4fab71b9504 to your computer and use it in GitHub Desktop.
Gravity Forms notification email template. Includes dynamic spam/scam identification helper links
<!-- Email Hack to ensure message preview snippets looks as desired -->
<div style="display: none; max-height: 0px; overflow: hidden;">{Name (First):1.3} filled out the website contact form and wrote: {Message:7}</div><!-- Insert &#847;&zwnj;&nbsp; hack after hidden preview text -->
<div style="display: none; max-height: 0px; overflow: hidden;">
&#847; &zwnj; &nbsp; &#8199; &shy; &#847; &zwnj; &nbsp; &#8199; &shy; &#847; &zwnj; &nbsp; &#8199; &shy; &#847; &zwnj; &nbsp; &#8199; &shy; &#847; &zwnj; &nbsp; &#8199; &shy; &#847; &zwnj; &nbsp; &#8199; &shy; &#847; &zwnj; &nbsp; &#8199; &shy; &#847; &zwnj; &nbsp; &#8199; &shy;
</div>
<!-- /Email Hack -->
<!-- Alert message -->
<aside>
<strong>
<span style="color:white;background-color: green;padding:0.25em 0.75em;border-radius:6px;text-transform:uppercase;">New</span>
&nbsp;Country of visitor
</strong>: <a href="https://ipinfo.io/{ip}">View location</a> | <a href="https://yourdomain.com/wp-admin/admin.php?page=gf_entries">Properly mark this form submission as spam</a>
<aside>
<hr>
<!-- /Alert message -->
<!-- Content -->
{Name (First):1.3} filled out the website contact form and wrote:
<blockquote><i>{Message:7}</i></blockquote>
<strong>Provided contact details:</strong>
<ul>
<li><strong>Email</strong>: <a href="mailto:{Email:4}">{Email:4}</a></li>
<li><strong>Web</strong>: {Website:3} <small>| <a href="https://sitecheck.sucuri.net/results/{Website:3}">Analyze with Sucuri</a> | <a href="https://transparencyreport.google.com/safe-browsing/search?url={Website:3}">Analyze with Google</a> | <a href="https://check.spamhaus.org/results/?query={Website:3}">Analyze with Spamhaus</a></small></li>
<li><strong>Tel</strong>: <a href="tel:{Phone:5}">{Phone:5}</a> <small>| <a href="https://www.ipqualityscore.com/free-phone-number-lookup/lookup/US/{Phone:5}">Analyze with IPQS</a></small></li>
</ul>
The form was submitted from the IP: <a href="https://ipinfo.io/{ip}">{ip}</a> on {date_mdy} while at the URL: {embed_url}.
They appeared to be using a browser identifying itself as: <a href="https://www.google.com/search?q=site%3Auser-agents.net+%22{user_agent}%22&amp;ie=UTF-8&amp;oe=UTF-8">{user_agent}</a> and Cloudflare's firewall did not detect their traffic as being undesirable.
They agreed to the consent prompt and by doing so affirmed that they agreed to Company's <a href="https://domain.com/privacy-policy/">Privacy Policy</a> and <a href="https://domain.com/terms-of-use/">Terms of Use</a>.
After submitting the form they were redirected to the dynamic customized thank you page at: <a href="https://domain.com/thank-you?sender={Name (First):1.3}">/thank-you?sender={Name (First):1.3}</a>. (A Google analytics tracking parameter has not been added to that URL, but could be.)
This form submission is stored on the website <a href="https://domain.com/wp-admin/admin.php?page=gf_entries">here</a> until it is manually deleted by a Wordpress admin.
<!-- /Content -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment