The short answer (without looking it up) :
- connect to a SMTP server of your choice, port 25
- send (on separate lines):
- HELO yourdomain.com
- mail from: you@sender.com
- rcpt to: someone@receiver.com
- data
- Subject: the subject
(blank line)
- 1 or more lines of text (mail body)
- . (just 1 period on a single line)
- QUIT (to break the connection)
You can try this by telnetting to port 25 on your server and trying the above, to see what the server responses are. Note: the domain in the HELO message does not really matter, put what you like.
Also I did a quick lookaround and found an open-source mail servlet on
http://www.coolservlets.com/CSMailForm/ .
Success, Ton