There is an app store module for this. Just visit the app store and search for email and download the email token template into your project.
For those like me new to both Mendix and Java, the answer to the original question is "in the absence of any other answer, Yes". After reading the brief Mx doco on Java Programming, then Java Actions, then the "Javadoc", and ignoring the red herring about Eclipse, I took a guess that this approach was at least plausible. I had to modify the code from the forum example to match the parameter names and return type I set up in my Mx Java Action, but - most amazingly - it worked.
If any person who does know what they are doing would like to agree or improve, please do so. It will help inexperienced others like me.