• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

My Mailing Application

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i have my Mailing application.
after session is created successfully, it sends mail but when
i write code to read Mail
"Store store=ssn.getStore();
Folder inbox=store.getFolder("INBOX");"
its giving exception Invalid protocol: null and
javax.mail.NoSuchProviderException: Invalid protocol: null
Please, How can i overcome this problem
-Abhijit Sane
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator





You need to supply the protocl for accessing the Mailbox which can be POP3 or IMAP etc..

1)This protocol can be defined in your mail properties file using variable mail.store.protocol

Alternately

2)Replace the above code by the below line and try



See if it works now!!!
 
abhijit sane
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you sir,
sir, i have ceated store succrssfully but there is one more problem
when i write the code for Folder
" Folder inbox=store.getFolder("INBOX");

out.println(inbox.getFullName());

inbox.open(Folder.READ_WRITE);

out.println(inbox.getMessageCount());

but , that is not retriving the any messages.
i am not understanding that, where is the problem that, i have hosted my application on apache web server.
and i have there mailing server access as my login and pass.
now how can i proceed i am not getting.
please, sir, help me regarding this.
 
I am mighty! And this is a mighty small ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic