It should be the same as internet mailing system.. :-)
Only diff woould be in run time environment..that is your mail server will
be accessible within you Local network..
Of course you would be using Java Mail API.. and you can get the same code
very easily.
Let us know in case of any problem further..