Dynamically create emails from page properties


Short: How can I make a button in a template that creates a custom email containing metadata from a logseq page (and its parents?)?

I am documenting some reports in LoqSeq organized as client/year/report-number and use a template for each report. In that template, I would like to include a button/HTML link that creates an email where some variables depend on the logseq page. For example, the subject should preferable be something like “ for , ”. More generally, we could even imagine having a property in with the mail addresses.

The HTML code by itself isn’t that complicated and can quickly be created by say https://mailtolinkgenerator.com/, such as:

<a href="mailto:test@example.com?subject=This%20is%20an%20email&body=Hi!%0A%0AThis%20is%20an%20email!%0A%0ABest%2C%0Ame%3A)">Create email</a>

Would it be possible to inlcude this in a template and inject page properties in the link? Or is a macro better?