You can use the %random% variable in Windows to create a file with a random number in the file name. From the DOS prompt just type: copy con %random%.txt. Type whatever you want in the file then save it by pressing the F6 key.
This creates a javascript function which adds a custom mailto to an href or other object like image or DIV. When clicked it will add custom VARS to the BODY of the email. This is cool when you dont want to use a server side FORM to do this. It also lets the user use their email client of choice.
You could add this to an error page for instance, especially for an internal webapp. For public, you might wanna do this another way. My criteria required for me to do this with a non SS solution and also use the clients mail client of choice. Found online at (http://www.webmasterworld.com/javascript/3290040.htm).
Tested in IE6 and FF2. Works fine when going to Outlook 2003.
<script type=”text/javascript”>
function emailForm(){var daReferrer = document.referrer;
var email = “yours@email.com”;
var errorMsg = “here here here is the error error error error”;
var subject = “Exception Error”;
var body_message = “%0D%0D%0D%0DThank you “+name+” for submitting this error to us. Please tell us in the space above, what you were doing when the error occurred.%0D%0DReferring Page: “+daReferrer+” %0D%0DException Error Message:%0D——————————————-%0D”+errorMsg;var mailto_link = ‘mailto:’+email+’?subject=’+subject+’&body=’+body_message;
win = window.open(mailto_link,’emailWindow’);
if (win && win.open &&!win.closed) win.close();
}
</script><div style=”border:2px solid black;padding:10px;”>
Please <a href=”#” onclick=”emailForm();”>Email Support</a>
</div>