• Post Reply Bookmark Topic Watch Topic
  • New Topic

My Mailing Application

 
abhijit sane
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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
 
Suraj Berwal
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!