I want in my HTML an href link which when clicked does a "mailto", like this:
<a href="mailto:email@example.com">Mail me</a>
Now, instead of the hard coded email address I want to return the address from a Delphi function. So I add a function like this (in a Unit named FormImprint):
function GetEMailAddress(AddrNo: Integer): String; begin Result := 'mailto:firstname.lastname@example.org'; end;
Then in the HTML I have tried something like:
The Pascal function seems to get called successfully, but instead of opening an empty email I see a blank page with nothing but the string
What do I have to do for the "mailto:" action to execute? Is my way of approaching this the best practice?