You can if you use a third party package from jakarta in the commons packages. Its called Net. Just use the SMTP part of it for the SMS. You can also use the
java Mail API which you can download from java.sun.com. This package is technically
J2EE but I would still consider it mostly J2SE work. Let me know if you have any questions. I've written several applications for the web just like this including portlets.