Trouble using antispambot()

I have a custom field in a theme that contains an email address and was pleased to find antispambot()

<p><a href="mailto:<?php antispambot(the_field('queries_e-mail')); ?>"> <?php echo antispambot(the_field('queries_e-mail'));?></a></p>

It looks fine and works as intended (ie. it opens a compose mail window) but when I view the code source it doesn’t appear to be encoded.

<p><a href=""></a></p>

According to the Codex the default usage is :

<?php echo antispambot(""); ?>

which should output:

However the encoding doesn’t appear to be working in my case.

Solutions Collecting From Web of "Trouble using antispambot()"