To ensure that the email address variable in your Magento 2 template is formatted as a clickable link that opens in the recipient's email app (such as Gmail), you can use HTML anchor tag syntax along with the mailto:
prefix. Here's how you can modify your template:
<a href="mailto:{{var order.getCustomerEmail()}}">{{var order.getCustomerEmail()}}</a>
This code will generate a clickable email link where the email address is populated dynamically from the order.getCustomerEmail()
variable. When the recipient clicks on the link, it should open their default email client (such as Gmail) with a new email draft pre-filled with the recipient's email address.
Make sure to test it to ensure it works as expected!