1

A similar question has been asked, but it was 6 years ago and there hasn't been any recent answers to the problem since then. I know the smarter way of allowing visitors to email via a website would be a contact form or a captcha to display the email address, but what about situations where the page design doesn't allow for such luxuries? My options are either display an email address or display a "click here" mailto link. Is there a more modern & unto date solution thank those in the original question?

Regards, --Michael

Community
  • 1
  • 1
Michael Ruta
  • 345
  • 3
  • 7
  • 13
  • Possible duplicate of [Hide Email Address from Bots - Keep mailto:](https://stackoverflow.com/questions/41318987/hide-email-address-from-bots-keep-mailto) – Chris van Chip Dec 23 '18 at 20:37

2 Answers2

3

So far, js remains the only efficient way of doing this.

See this long discussion for more information

Here's a sample js snipp that does the job.

<SCRIPT TYPE="text/javascript">
  emailE = 'emailserver.com'
  emailE = ('yourname' + '@' + emailE)
  document.write('<A href="mailto:' + emailE + '">' + emailE + '</a>')
</script>
<NOSCRIPT>
  Email address protected by JavaScript
</NOSCRIPT>
Community
  • 1
  • 1
-1

a.reverse {
  unicode-bidi: bidi-override;
  direction: rtl;
}
<h1>Copy and paste the email below box</h1>

<span style="color:#FFF;">
<p style="color:black">Email Enquiry:</p>                    
<a class="reverse" style="color:blue">moc.sysartxed@ofni</a>
</span>    

<div style="margin-top:20px">
<input type="text">
</div>
John
  • 1