SMTPConn & SMTPMsg Classes

These two classes work together to provide (at the moment very basic) e-mail functionality. The SMTPConn class provides methods for connecting to and communicating with a SMTP mail server, the SMTPMsg class contains a standard structure for an e-mail along with some verification methods. These classes are provided free under the GNU General Public License.

Download

The two classes and a sample application demonstrating how to implement them are included in the zip file.

How to use

I've copied the same format as the official Java 2 Platform API documents to explain how to use these classes in your own applications as well as included a sample program in the zip file. Choose one of the classes below to view it's documentation.

Limitations

The classes were written and tested using version 1.5.0_06 of the JDK. They may work with prior versions, but have not been tested.

As mentioned, these classes at present provide very basic e-mail functionality. You can only provide one e-mail address per field, i.e. one "To" address, one "CC" address and so on. They do not support attachments or the SMTP AUTHentiction extensions. These are due to be built in at a later date, if you add this functionality yourself, please e-mail me the updated source to save me the time.

Relevant RFCs

The following RFCs were referenced during the creation of the classes and may be of use to anyone wanting to extend them further.

Feedback

I would really appreciate any feedback you could provide on these classes, what you like, what you don't, any constructive critisim etc. You can either leave comments below, or e-mail me.