Help me in reciving mail via IMAP

Hi all,

I wanted to recive mails same as sending mails throght smtp.

For e-mail reciver i need to use IMAP protocol.I got i need to pass provider to getstore method as a parameter ..

For ex:store.getStore("IMAP");..

Here,IAm gettin error no such provider.. Please tell me whetehr i wants to pass por / anything else.. bcz i tried out with ip address ,servername and also port it is not connectng.

Please help to code for reciving mail

Regards,

Chintu

[499 byte] By [chintu_gowdaa] at [2007-10-2 17:50:50]
# 1
The correct name is "imap", not "IMAP".
bshannona at 2007-7-13 19:09:08 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

Hi all,

Thanks to shannon,i chnaged the imap .. bt now error is with the connet method, the username,password,whcih iam passing as a parametre.Its giving error as authentication error, login failed.. but the username and password were corret..

store.connect(Host,username,password);

Host Iam passing is the server ipaddress..

Please ,help to cross over this bug.

Thanks for you ll n advance.

Regards,

Chintu

chintu_gowdaa at 2007-7-13 19:09:08 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
Obviously the server disagrees with you that the username andpassword are correct.What server are you using?Show us the protocol trace.(Read the FAQ and the NOTES.txt file that comes with JavaMail.)
bshannona at 2007-7-13 19:09:08 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4

Hi all,

Thanks to shannon..

i am able to list all the mails even with subject pattern also..

but i want to list recent mails...and also mails which are not read..

and 1 more thing i wants to save the attachments from the mail.

Please help me out in this..

Thanks in advance..

Chintu

chintu_gowdaa at 2007-7-13 19:09:08 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...