• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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.
 
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic