You've got multiple methods really, you should of course consider that such bots harvesting this content are essentially scraping whatever pages they come across and searching for patterns that look like email addresses. As you say, it's a bit of an arms race and there's nothing stopping the people developing such scrapers from implementing these methods (wait, is that why you're asking?)
You're going to want to avoid actually creating a hyperlink out of your email address in most cases, and you certainly want to avoid using mailto: - that's basically announcing to anybody reading the page "hey, I'm an email address".
Let's start of nice and simple, spacing:
m y e m a i l @ m y d o m a i n . c o m
It's obviously an email address to a human, looks like a bunch of random letters with spaces to a scraper. Don't like spacing? Much less common but far more foolproof is to convert your email address into an image. It's still human readable but it's not going to be something that most email scrapers are looking for, let alone able to parse.
How about converting your punctuation (@ and period) into their HTML equivalents (@
and .
respectively)?
myemail@mydomain.com
This still looks like an email address when rendered by the browser, but it isn't going to be all that difficult to work around from the point of view of scraping since you'd just look for the .
and @
- but why stop there? Why not go all the way and just encode the entire email address? This can be done quite easily with a tool like Rumkin's Mailto Encoder, suddenly your email address looks like this:
myema%69l@my%64%6fma%69n%2e%63om
This still renders like you'd expect in a browser, but is basically gibberish as far as any scraper that doesn't take the encoding into consideration.
You can also do this with CSS if you're so inclined with something like this:
<style>
my-email::after { content: attr(data-domain); }
my-email::before { content: attr(data-user); }
</style>
<my-email data-user="myemail" data-domain="mydomain.com">@</my-email>
Or, as already discussed on Stack Overflow, you could just use JavaScript.