you can use JavaMail API for sending mail
but the better approach is apache common email component which is
simple abstract API on java mail,
if you need a scheduling system that automatically send mail you can use
scheduling framework such as Quartz and if you want to send mail
automatically based on some action you can use aspect frameworks.
http://commons.apache.org/email/