Package org.subethamail.smtp.helper

Examples of org.subethamail.smtp.helper.SimpleMessageListenerAdapter


   * The default port is 25. Call setPort()/setHostname() before
   * calling start().
   */
  public Wiser()
  {
    this.server = new SMTPServer(new SimpleMessageListenerAdapter(this));
  }
View Full Code Here


  @Test()
  public void testNoMailJar() throws SMTPException, IOException
  {
    // if this variable is set to null, than a NPE will be thrown, which is
    // also good for testing.
    MessageHandlerFactory handlerFactory = new SimpleMessageListenerAdapter(new SimpleMessageListener()
    {

      @Override
      public void deliver(String from, String recipient, InputStream data) throws TooMuchDataException,
          IOException
View Full Code Here

     *
     * @throws Exception
     */
    @PostConstruct
    public void startup() throws Exception {
        server = new SMTPServer(new SimpleMessageListenerAdapter(listener));
        server.setBindAddress(InetAddress.getLoopbackAddress());
        server.setPort(BIND_PORT);
        server.start();
    }
View Full Code Here

    private static SMTPServer SERVER;

    @BeforeClass
    public static void startEmbeddedServer() {
        assertNull("Server already initialized", SERVER);
        SERVER = new SMTPServer(new SimpleMessageListenerAdapter(SmtpServerListener.INSTANCE));
        SERVER.setHostName("localhost");
        SERVER.setPort(TEST_PORT);
        SERVER.start();
        System.out.println("Started embedded server on port " + SERVER.getPort());
    }
View Full Code Here

    /** Smtp server instance */
    private SMTPServer smtpServer;

    @Override
    protected void startup() {
        smtpServer = new SMTPServer(new SimpleMessageListenerAdapter(this));
        smtpServer.setSoftwareName(getName());
        smtpServer.setPort(port);
        smtpServer.start();
    }
View Full Code Here

    assertResponse(wiser, future);
  }

  public void doTest() throws Exception {
    Wiser wiser = new Wiser();
    SMTPServer smtpServer = createServer(new SimpleMessageListenerAdapter(wiser));
    smtpServer.setHostName("localhost");
    smtpServer.setPort(5000);
    TestPluginLifeCycle lifeCycle = createLifeCycle();
    try {
      lifeCycle.start();
View Full Code Here

   * The default port is 25. Call setPort()/setHostname() before
   * calling start().
   */
  public Wiser()
  {
    this.server = new SMTPServer(new SimpleMessageListenerAdapter(this));
  }
View Full Code Here

TOP

Related Classes of org.subethamail.smtp.helper.SimpleMessageListenerAdapter

Copyright © 2018 www.massapicom. 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.