POP3 Javamail
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Yogesh_Sharma
Posted On:   Tuesday, May 22, 2001 10:40 PM

Hi When I run my POP3 servlets this error comes again & again, Anyone can tell me what is the problem No Provider for POP3, I am also attaching the source code with this, Please help me, Its very urgent for me, Thanks in Advance Printing part is not attached import javax.servlet.*; import javax.servlet.http.*; import javax.mail.*; import javax.activation.*; import javax.mail.internet.*; import java.io.*; import java.util.*; public class popmail extends HttpServlet implements SingleThreadModel { Session session=null; String pop3host="pop.mail.yahoo.com"; String smtphost="smtp.spectranet.com";   More>>

Hi
When I run my POP3 servlets this error comes again & again, Anyone can tell me what is the problem

No Provider for POP3,

I am also attaching the source code with this, Please help me, Its very urgent for me, Thanks in Advance

Printing part is not attached


import javax.servlet.*;
import javax.servlet.http.*;
import javax.mail.*;
import javax.activation.*;
import javax.mail.internet.*;
import java.io.*;
import java.util.*;
public class popmail extends HttpServlet implements SingleThreadModel
{
Session session=null;
String pop3host="pop.mail.yahoo.com";
String smtphost="smtp.spectranet.com";

public void init(ServletConfig config)throws ServletException
{
super.init(config);
}

public void doPost(HttpServletRequest req,HttpServletResponse res)throws ServletException, IOException
{
PrintWriter out=res.getWriter();
// HttpSession httpSession=req.getSession(false);

try{

//Properties props = System.getProperties();

// props.put("mail.pop.host",pop3host);



Session pop3session = Session.getInstance(System.getProperties(),null);
pop3session.setDebug(false);
Store pop3store=pop3session.getStore("pop3");
String user=req.getParameter("user");
String pwd=req.getParameter("pwd");
System.out.println("Pop3store : " +pop3store);
pop3store.connect(pop3host,user,pwd);


Folder folder=pop3store.getFolder("INBOX");
System.out.println("folder is : " +folder);
folder.open(Folder.READ_ONLY);
Message[] msgs=folder.getMessages();




}
}

   <<Less

Re: POP3 Javamail

Posted By:   John_Zukowski  
Posted On:   Sunday, May 27, 2001 09:28 AM

As already answered in the FAQ, JavaMail 1.1 doesn't come with a POP3 provider.
About | Sitemap | Contact