sends a MIME formatted message
The basic content is a result of %SEARCH -like oepration and hence is in HTML. This forms the HTML part of the message.
The text-mode part is then produced by editing out the HTML tags.
However along the way the URL is munged.
As a result, the URLs in the text ode part come out like this:
Parameters to getScriptUrl were in the wrong order; I changed them a while ago, and obviously missed this call.