RemoteDelivery rd = new RemoteDelivery();
MockMailContext mmc = new MockMailContext();
mmc.setAttribute(Constants.AVALON_COMPONENT_MANAGER,m_serviceManager);
mmc.setAttribute(Constants.HELLO_NAME,"localhost");
MockMailetConfig mci = new MockMailetConfig("Test",mmc,getStandardParameters());
mci.setProperty("bind", "127.0.0.1");
mci.setProperty("gateway","127.0.0.1");
mci.setProperty("gatewayPort",""+m_smtpListenerPort);
rd.init(mci);
String sources = "Content-Type: text/plain;\r\nSubject: test\r\n\r\nBody";
String sender = "test@localhost";
String recipient = "test@localhost";
MimeMessage mm = new MimeMessage(Session.getDefaultInstance(new Properties()),new ByteArrayInputStream(sources.getBytes()));