Read mail from POP3 server and store on local hard disk using MH Provider.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sharmila_punde
Posted On:   Thursday, April 3, 2003 01:56 AM

I am planing do develop a application which will

user JavaMail API to read emails from POP3

server and store it on the local hard disk.

To store mails on local hard disk is possible

using MH Provider which is third party provider.

Can any one send some examples which read mail

from POP3 and store on local hard disk using

MH Provider?. And retrive mail from MH Provider
when client requests?.

Re: Read mail from POP3 server and store on local hard disk using MH Provider.

Posted By:   sharmila_punde  
Posted On:   Thursday, April 3, 2003 06:16 AM

I got answere!


//Get Session object as -

props.put("mail.smtp.host", smtpServer);
Session session = Session.getDefaultInstance(props, null);

//Create URLName as given in sun site.

URLName urlName = new

URLName(null,null,0,"~","user","passwd");


//And create MHStore and next is as usual.

MHStore mhStore = new MHStore(session,urlName);

MHFolder folder2 =

(MHFolder)mhStore.getFolder("FolderName");


MHMessage mhMessage =(MHMessage)folder2.getMessage(1);

Message msg = (Message)mhMessage;

About | Sitemap | Contact