tags:

views:

15

answers:

1

props.put("mail.debug", "true"); props.setProperty("mail.store.protocol","imaps"); props.setProperty("mail.imaps.auth.plain.disable","false"); props.setProperty("mail.imaps.host","Mail3.connect.com"); props.setProperty("mail.imaps.port","135"); props.setProperty("mail.imaps.user","test"); props.setProperty("mail.imaps.pwd","123"); props.setProperty("mail.imaps.ssl.protocols","SSL"); props.setProperty("mail.imaps.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); props.setProperty("mail.imaps.socketFactory.fallback", "false"); props.setProperty("mail.imaps.socketFactory.port", "135");

i have done all this but it still says javax.mail.AuthenticationFailedException: failed to connect, no password specified?

kindly help me out thanks


i have also used following code to make connection but all in trash

import java.util.Properties; import javax.mail.*;

public class TestSSL {

/**
 * @param args
 */
public static void main(String[] args) {

            Properties props = System.getProperties();          
        props.put("mail.imaps.auth.plain.disable","true"); 
            try {
                Session session = Session.getDefaultInstance(props, null);
                session.setDebug(true);
                Store store = session.getStore("imaps");
                store.connect("host", 993, "username", "password");
                System.out.println(store);
                Folder inbox = store.getFolder("Inbox");
                inbox.open(Folder.READ_ONLY);
                Message messages[] = inbox.getMessages();
                for(Message message:messages) {
                    System.out.println(message);
                }
        }  catch (Exception e) {
            e.printStackTrace();
            System.exit(2);
        }

}

pllllllllllzzzzzzzzzzzzzzzz help

A: 

Try using Apache JAMES that will solve your problem. Let us know how it worked out. Best of Luck. Bye

Dear, I dont require a mail server but i need to connect on througth imaps please help