private static final String HOSTNAME = "localhost";
public static void main(String[] args) throws Exception {
// Explicitly set a strategy for storing body parts. Usually not
// necessary; for most applications the default setting is appropriate.
StorageProvider storageProvider = new TempFileStorageProvider();
DefaultStorageProvider.setInstance(storageProvider);
// Create a template message. It would be possible to load a message
// from an input stream but for this example a message object is created
// from scratch for demonstration purposes.