This task is very simple, for normal CMS. For Joomla, I publish the solution in this article.
In the Designer tab, add Custom Code
Pure Code – Yes checkbox
In the Code line add this one:
<input type='hidden' name='page_url' id='page_url' value='<?php echo \JURI::getInstance()->toString(); ?>' />
To display a link in an email, you can use the {page_url} tag.