How to access Gmail Particular Label content programmatically
javax.mail.Folder inbox = store.getFolder("SMS");
inbox.open(Folder.READ_WRITE);
Message messages[] = inbox.getMessages();
int count = messages.length;
Log.d("SMS count ", ""+count);
for (Message message : messages){
// System.out.println(message);
Log.d("inbox msssgggggg ", "Sub : "+message.getSubject()
+" Body :"+message.getContent().toString() +" From
:"+message.getFrom());
}
Where store is IMAPStore object
javax.mail.Folder inbox = store.getFolder("SMS");
inbox.open(Folder.READ_WRITE);
Message messages[] = inbox.getMessages();
int count = messages.length;
Log.d("SMS count ", ""+count);
for (Message message : messages){
// System.out.println(message);
Log.d("inbox msssgggggg ", "Sub : "+message.getSubject()
+" Body :"+message.getContent().toString() +" From
:"+message.getFrom());
}
Where store is IMAPStore object
No comments:
Post a Comment