Package org.subethamail.smtp.client

Examples of org.subethamail.smtp.client.SmartClient.quit()


    try
    {
      SmartClient client = new SmartClient("localhost", smtpServer.getPort(), "test-client.example.org");
      client.from("john@exmaple.com");
      client.to("jane@example.org");
      client.quit();
    }
    finally
    {
      smtpServer.stop();
    }
View Full Code Here


        smartClient.to("postmaster@example.org");
        smartClient.dataStart();
        byte[] bytes = ExampleMailData.simple().bytes;
        smartClient.dataWrite(bytes, bytes.length);
        smartClient.dataEnd();
        smartClient.quit();

        assertTrue(quitReceived);
        assertEquals(1, wiser.getMessages().size());
    }
View Full Code Here

            throw new SendException("Connection failed: " + e.toString(), e,
                    new EnhancedStatus(450, "4.4.0",
                            "No answer from host or bad connection"), remoteMta);
        } finally {
            if (smartClient != null) {
                smartClient.quit();
            }
            outgoingConnectionsRegistry.releaseConnection(inetAddress);
        }
    }
View Full Code Here

        client.to("jane@example.com");
        client.dataStart();
        byte[] exampleMail = ExampleMailData.simple().bytes;
        client.dataWrite(exampleMail, exampleMail.length);
        client.dataEnd();
        client.quit();

        WiserMessage message = wiser.getMessages().get(0);
        assertThat(message.getData(), new ArrayEndsWith(exampleMail));
    }
View Full Code Here

        client.to("john@example.com");
        client.dataStart();
        byte[] exampleMail = ExampleMailData.simple().bytes;
        client.dataWrite(exampleMail, exampleMail.length);
        client.dataEnd();
        client.quit();
    }

    private void retrieveMail() throws NoSuchProviderException,
            MessagingException, IOException {
        Properties properties = new Properties();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.