// Create and send NNTP transport
statusPos += 2; // 9
statusLine = "Creating NNTP transport";
status.setStatus( statusPos, statusLine );
Transport transport = new NNTPTransport( session, new URLName( "news:" + newsgroup ));
// Null parameters are for user name and password
statusPos++; // 10
statusLine = "Connecting to mail server";
status.setStatus( statusPos, statusLine );
transport.connect( hostname, null, null );
statusPos++; // 11
statusLine = "Sending message";
status.setStatus( statusPos, statusLine );
transport.sendMessage( message, message.getAllRecipients() );
statusPos++; // 12
statusLine = "Closing transport";
status.setStatus( statusPos, statusLine );
transport.close();
// Clean up when finished
attachments.removeTempDocs();
return true;