• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

How to fetch mails from my Inbox?  RSS feed

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want some help on using JavaMail API to get mails from my mailbox and process the data. Can anyone give a reference link or some sample code to do the same? Also will JavaMail APIs suffice my requirements or do I require something else to actually fetch the mail from my mailbox and give it to a program for processing? Any kind of help is welcomed.
 
Bartender
Posts: 9526
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How's about starting with the JavaMail API home page? There's a FAQ and links to several tutorials there.
 
Ketan KC Chachad
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the link .... I tried one of the reading mails program given there and it is giving me the following exception


javax.mail.AuthenticationFailedException: Bad login
at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:104)
at javax.mail.Service.connect(Service.java:256)
at javax.mail.Service.connect(Service.java:135)
at com.ketan.test.MailTester.getMessages(MailTester.java:71)
at com.ketan.test.MailTester.main(MailTester.java:101)


The method where the exception is thrown is given below

The exception is thrown at the this.mstoreMail.connect( .... ); line where
  • mstrMailHostIp stores the IP address of the mail server,
  • mstrUsername stores the username to access the POP3 mail server, and
  • mstrPassword stores the password used for authentication
  • Can you suggest me where the mistake could be?
     
    Ketan KC Chachad
    Ranch Hand
    Posts: 77
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Gee sorry my mistake .... was giving the wrong password .... it works ... thanks anyways
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!