Package org.apache.commons.net.smtp

Examples of org.apache.commons.net.smtp.SMTPClient.connect()


            server = new NettyServer(createProtocol(hook, testHook));
            server.setListenAddresses(address);
            server.bind();
           
            SMTPClient client = createClient();
            client.connect(address.getAddress().getHostAddress(), address.getPort());
            assertTrue("Reply="+ client.getReplyString(), SMTPReply.isPositiveCompletion(client.getReplyCode()));
           
          
            client.helo("localhost");
            assertTrue("Reply="+ client.getReplyString(), SMTPReply.isPositiveCompletion(client.getReplyCode()));
View Full Code Here


            server = new NettyServer(createProtocol(connectHandler));
            server.setListenAddresses(address);
            server.bind();
           
            SMTPClient client = createClient();
            client.connect(address.getAddress().getHostAddress(), address.getPort());
            assertTrue("Reply="+ client.getReplyString(), SMTPReply.isNegativePermanent(client.getReplyCode()));
           
            client.disconnect();

View Full Code Here

            server = new NettyServer(createProtocol(connectHandler));
            server.setListenAddresses(address);
            server.bind();
           
            SMTPClient client = createClient();
            client.connect(address.getAddress().getHostAddress(), address.getPort());
            assertTrue("Reply="+ client.getReplyString(), SMTPReply.isNegativeTransient(client.getReplyCode()));
           
            client.disconnect();

View Full Code Here

            server = new NettyServer(createProtocol(handler))
            server.setListenAddresses(address);
            server.bind();
           
            SMTPClient client = createClient();
            client.connect(address.getAddress().getHostAddress(), address.getPort());
            assertTrue("Reply="+ client.getReplyString(), SMTPReply.isPositiveCompletion(client.getReplyCode()));
           
            client.disconnect();
           
            Thread.sleep(1000);
View Full Code Here

            client = new SMTPClient();
            client.addProtocolCommandListener(new PrintCommandListener(
                                                  new PrintWriter(System.out), true));

            client.connect(server);

            if (!SMTPReply.isPositiveCompletion(client.getReplyCode()))
            {
                client.disconnect();
                System.err.println("SMTP server refused connection.");
View Full Code Here

        try {
            server = createServer(createProtocol(hook), address)
            server.bind();
           
            SMTPClient client = createClient();
            client.connect(address.getAddress().getHostAddress(), address.getPort());
            assertTrue(SMTPReply.isPositiveCompletion(client.getReplyCode()));
           
            client.noop();
            assertTrue(SMTPReply.isPositiveCompletion(client.getReplyCode()));
View Full Code Here

        try {
            server = createServer(createProtocol(hook), address)
            server.bind();
           
            SMTPClient client = createClient();
            client.connect(address.getAddress().getHostAddress(), address.getPort());
            assertTrue(SMTPReply.isPositiveCompletion(client.getReplyCode()));
           
            client.helo("localhost");
            assertTrue(SMTPReply.isPositiveCompletion(client.getReplyCode()));
View Full Code Here

        try {
            server = createServer(createProtocol(hook), address)
            server.bind();
           
            SMTPClient client = createClient();
            client.connect(address.getAddress().getHostAddress(), address.getPort());
            assertTrue(SMTPReply.isPositiveCompletion(client.getReplyCode()));
           
            client.helo("");
            assertTrue("Reply="+ client.getReplyString(), SMTPReply.isNegativePermanent(client.getReplyCode()));
           
View Full Code Here

        try {
            server = createServer(createProtocol(hook), address)
            server.bind();
           
            SMTPClient client = createClient();
            client.connect(address.getAddress().getHostAddress(), address.getPort());
            assertTrue(SMTPReply.isPositiveCompletion(client.getReplyCode()));
           
            client.helo("localhost");
            assertTrue(SMTPReply.isPositiveCompletion(client.getReplyCode()));
View Full Code Here

            ((SMTPConfigurationImpl) protocol.getConfiguration()).setUseAddressBracketsEnforcement(false);
            server = createServer(protocol, address)
            server.bind();
           
            SMTPClient client = createClient();
            client.connect(address.getAddress().getHostAddress(), address.getPort());
            assertTrue("Reply="+ client.getReplyString(), SMTPReply.isPositiveCompletion(client.getReplyCode()));
           
            client.helo("localhost");
            assertTrue("Reply="+ client.getReplyString(), SMTPReply.isPositiveCompletion(client.getReplyCode()));
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.