Link to home
Create AccountLog in
Avatar of sigma19
sigma19Flag for United States of America

asked on

Jmail access exchange server?

Can  I access Exchange server using Jmail.
I am able to access the POP server using Jmaill and retrive messages.

I am looking for a snap shot of the code or any information how to access Exchange server from Jmail.

This is how I am able to make Jmail access pop server.

                URLName urln = new URLName("pop3://" +emailUser+":"+emailPass+"@"+pop3Server+"/INBOX");
out.println("<!-- urln = " + urln + "-->");
                POP3Store store = new POP3Store(session,urln);
                Folder folder = null;
                int msgCount = 0;
                Message[] msgs = new Message[10];
                try {
                        store.connect();
                        folder = store.getFolder("INBOX");
                        folder.open(Folder.READ_ONLY);
                        msgCount = folder.getMessageCount();
                        folder.fetch(msgs,new FetchProfile());

.....
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

What would you want to do on the server if you can get access? Isn't POP enough?
Avatar of sigma19

ASKER

I want to access to exchange server in the same way I am able to access to the pop server to read a email.
CEHJ has asked what do you want to do.
Read an email? You already do this. Or am I missing something?
Avatar of sigma19

ASKER

I want top read a email from my jmail application.
when the server is pop3 , it works and it gets connected.
when the server is Exchange server it does not work.

So i am looking for some help, how I can access exchange server to read a email from my jmail application.
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account