How do you send an SMS message using the JavaMail API?

Lasse Koskela

First of all, you need an SMS gateway for sending SMS messages (unless you plan to code one yourself...)

Take a look at, for example, www.kannel.org for an open source SMS gateway.

The way you actually send messages via a gateway is largely dependent on the gateway software's APIs. Some permit just using standard SMTP commands to send (and thus permit just using the regular JavaMail API).