Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

javaMail API and Vpopmail

801478Nov 6 2007 — edited Jun 6 2009
Hi friends...

I am using vpopmail and qmail ..in gentoo Linux.. to send and receive mail....

I want to read mail from vpopmail...

I got these commands in google....


Session session = Session.getDefaultInstance(System.getProperties());
Store store = session.getStore(new URLName("maildir:///home/vpopmail/domains/localhost/postmaster/Maildir/"));
Folder f = store.getDefaultFolder();

When i ran the program i displayed :

Exception in thread "main" javax.mail.NoSuchProviderException: maildir
at javax.mail.Session.getService(Session.java:750)
at javax.mail.Session.getStore(Session.java:550)
at javax.mail.Session.getStore(Session.java:512)
at com.nit.study.two.main(two.java:12)



This is the statements i got in google :

I created a new file named javamail.providers in the lib directory in $JAVA_HOME and placed the following entry in it.
protocol=maildir; type=store; class=org.infodancer.mail.maildir.DirectoryStore; vendor=infodancer

Then it occured to me that I may be putting the providers file in the wrong place. I am still using the same javamail
library I downloaded four years ago (that's how long i have been working with mail),the documentation may have
been updated with out my knowing it. So I tried putting the javamail.providers file in $JAVA_HOME/jre/lib and
suprise, suprise it works!!

URL for it :

http://www.raditha.com/blog/archives/000348.html





My directory structure in gentoo Linux :

vinodram@tux1 /var/vpopmail/domains/jpanel.com/shashi/.maildir/new $ cat 1192876186.6225.tux1,S=326
Return-Path: <shashi2k6@gmail.com>
Delivered-To: shashi@jpanel.com
Received: (qmail 6223 invoked by uid 0); 20 Oct 2007 10:29:45 +0000
Date: 20 Oct 2007 10:29:45 +0000
Message-ID: <20071020102945.6222.qmail@idhost>
To: shashi@jpanel.com
From: shashi2k6@gmail.com
Subject: Sending mail from checking.

Sorrow is temporary one

vinodram@tux1 /var/vpopmail/domains/jpanel.com/shashi/.maildir/new $

1192876186.6225.tux1,S=326 [mail arrived to me...]


how to view mail that is in vpopmail.... using javamaiAPI..

Thank You,
shashi
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 4 2009
Added on Nov 6 2007
1 comment
241 views