JavaMail Pop3 problems

I am trying to read emails from a pop3 account. Even using the code provided by sun in the JavaMail examples directory, I can't seem to connect. I am getting this error:
java.net.ConnectException: Connection refused: no further information
at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:63)
at javax.mail.Service.connect(Service.java:227)
at msgshow.main(msgshow.java , Compiled Code)
Can someone explain to me how to remedy this problem? Thank you in advance.
Jimmy

I have a similar problem . I want to extract the contents of the mail which is nothing but FORM ,with a set of KEY_VALUE pair to ACCESS.Can anybody help me with this issue?It is urgent!!!

Similar Messages

  • Hi javamail pop3 problem

    hello...
    i have a written code for retrieving mail from pop3 server...and its working fine except one problem....(if it is a problem)....
    when i retrieve mails i open outlook express and it again retrieves the same mails i have retirieved from my code....is this a normal behaviour as pop3 deletes all the retrieved messages....and when i first receive message using outlook my code is unable to find those messages .....so why this difference....should my code deliberately and explicitly delete messages after retrieving them or pop3 does it as its default behaviour....

    The emails on the POP3 server are not deleted from the server as they retrieved.
    In Outlook Express as well as in Outlook you can set the properties for your email account to leave a copy of the message on the server. The initial setting is to delete the message from the server as you retrieve it.
    In JavaMail in order to delete the email from the server you need to open the folder object for Read/Write, then to set the DELETED flag on the message to �true�;
    When you close the folder, deleted messages will be removed if you set the expunge parameter to �true�.
    As in the following code:
    Folder folder = store.getFolder("INBOX");
    folder.open(Folder.READ_WRITE);
    Message message = folder.getMessage(1);
    message.setFlag(Flags.Flag.DELETED, true);
    folder.close(true);

  • POP3 problems

    Hi guys!
    I have a problem using JavaMail implementing a simple Mail download system:
    My code is the following:
    Session session = null;
    Store store = null;
    Folder folder = null;
    try {
    session = Session.getDefaultInstance(System.getProperties(),null);
    store = session.getStore("pop3");
    store.connect(<POP3SERVER>,<USERNAME>,<PASSWORD>);
    if (store.isConnected()) System.out.println("connected");
    folder = store.getDefaultFolder();
    folder.open(folder.READ_ONLY);
    Folder list[] = new Folder[10];
    list = folder.list();
    System.out.println(list[0].getName());
    Message[] msg = folder.getMessages();
         for (int i = 0; i < folder.getMessageCount(); i++)
         System.out.println(msg.getFrom());
         System.out.println(msg[i].getSubject());
    folder.close(true);
    } catch(Exception ex){
    System.out.println(ex.getMessage());
    The output in the console is:
    connected
    open
    Press any key to continue.... :-)
    Why I can't get the message content?
    Could someone tell me?
    Thank you very much.
    Giuseppe

    - See if there are any messages in your default folder. Also, verify whats your default folder. If you think there are messages, just print a log for getMessgaeCount()
    - Or open a specific folder such as "INBOX".
    Check out this article, this has some sample code.
    http://www.javaworld.com/javaworld/jw-10-2001/jw-1026-javamail-p2.html
    HTH.

  • GMail POP3 problem: Not getting messages with sender "me"

    HI guys,
    I have an account called [email protected] , I successfully sent mails to the same using javamail.In this messages,sender is marked as "me".
    Now I want to read all the messages in inbox,including the messages sent by same account itself.(messages with "me" sender).
    But I notices that javamail doesnt read any messages which the sender is "me".
    Is there a solution for this?
    thanks in advance,
    umanga
    Edited by: virtualumanga on Jun 6, 2008 7:09 PM
    Edited by: virtualumanga on Jun 6, 2008 7:10 PM

    Ok.Heres what happens.
    When I send emails to the same account using gmail webbase application , those mails (which the sender is "me") are read from my Java-POP3 code.
    But when I send mail using my Java-SMTP code , and try to retrieve them using same Java-POP3 program,those mails are not read.
    Here is my temp account that I am using
    user : [email protected]
    password: umanga123
    You can see there are 3 mails (please dont delete them) , which were sent using my Java-SMTP code.And one mail which is,sent from my yahoo account.
    Below Is the java-POP3 code that I am reading my messages.You can run them your self and see that the messages with "me" and not reading,only the message from yahoo is reading.
    You can test following code without any modifications..
    Please help,
    thanks in advance.
    public class MailGet {
         public static void main(String args[]) throws Exception
              String host="pop.gmail.com";
              String user="fhb.test";
              String pwd="umanga123";
              //String from="[email protected]";
              //String to="umanga@quicksilver";
              Properties props=new Properties();
              props.put("mail.pop3.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
              props.put("mail.pop3.socketFactory.fallback", "false");
              props.put("mail.pop3.port", "995");
              props.put("mail.pop3.socketFactory.port", "995");
              //FileInputStream fis=new FileInputStream("/home/umanga/pop.prop");
              //props.load(fis);
              Session session=Session.getDefaultInstance(props,
                        null);
         try {     
              Store store=session.getStore("pop3s");
              store.connect(host,user,pwd);
              Folder folder=store.getDefaultFolder().getFolder("Inbox");
              folder.open(Folder.READ_WRITE);
             System.out.println("Getting messages");
              Message msg[]=folder.getMessages();
             System.out.println(folder.getMessageCount()+" "+folder.getUnreadMessageCount());
             for(int i=0;i<msg.length;i++)
                  System.out.println("Subject: "+msg.getSubject() );          
         folder.close(true);
         } catch (Exception e) {e.printStackTrace(); }     
    Edited by: virtualumanga on Jun 7, 2008 4:45 AM
    Edited by: virtualumanga on Jun 7, 2008 4:46 AM
    Edited by: virtualumanga on Jun 7, 2008 5:21 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • JavaMail, ESMTP, problem with this server response: "+  stunnel"

    I need to send message through a STMP server I don't know much about. The server works fine, when using port 25. But I need to send mail through port 465. I've looked around the web, I've searched the forums, but found no solution.
    I've identified, that the server uses some kind of strange "secure" connection. I was told, that is uses SSL, but when I use SMTPSSLTransport, it says the "Unrecognized SSL, plaintext connection?". So I am using the common Transport. This is my code:
                props.put("mail.transport.protocol","smtps");
                props.put("mail.smtp.host", smtpHost);
                props.put("mail.smtp.port", 465);           
                props.put("mail.smtps.starttls.enable","true");
                props.put("mail.smtps.ssl", "true");
                props.put("mail.smtps.socketFactory.port", 465);
                props.put("mail.smtps.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
                Session session = Session.getDefaultInstance(props);
                session.setDebug(true);
                Transport transport = session.getTransport();
    ...I am getting this output:
    DEBUG: setDebug: JavaMail version 1.4.1
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
    DEBUG SMTP: useEhlo true, useAuth false
    DEBUG SMTP: trying to connect to host "host name of the server", port 465, isSSL false
    220 "host name of the server" ESMTP Sendmail 8.13.1/8.13.1; Fri, 15 Feb 2008 18:10:49 +0100
    + stunnelDEBUG SMTP: connected to host "host name of the server", port: 465
    EHLO "my hostname"
    DEBUG SMTP: bad server response:  + stunnel
    HELO "my hostname"
    250-"my hostname"
    WelcomeDEBUG SMTP: use8bit false
    MAIL FROM:<[email protected]>
    250 STARTTLS
    220 Go ahead
    RCPT TO:<[email protected]>
    DEBUG SMTP: got response code 220, with response: 220 Go ahead
    RSET
    DEBUG SMTP: exception reading response: java.net.SocketException: Connection reset
    javax.mail.MessagingException: Exception reading response;
      nested exception is:
            java.net.SocketException: Connection resetI have no idea, what a stunnel is, but it is causing the problem, I think.
    Does anybody have any ideas what can be wrong? Or does anyone know how to check the server setting? Or what properties can I try to set? (I've tried all possible options of the properties I am already setting in the code).

    You're getting newline (LF without the CR)? If so,
    it's possible that Thunderbird isn't seeing that as
    an end of line and so considers the "+stunnel" to
    be part of the greeting line.
    Either way, there's something messed up in the
    server configuration and you really need to report
    that to the server administrator.
    Also, port 465 is supposed to be an SSL port,
    starting in SSL mode, not starting in plain text
    mode as you're seeing. Again, this is evidence
    that the server is set up incorrectly.
    JavaMail will support STARTTLS just fine, and it
    won't care what port you're using, but that bogus
    "+stunnel" line is a protocol violation that's
    confusing it. Possibly Thunderbird is taking the
    approach of "throw away garbage until I see
    something I recognize", but JavaMail isn't working
    that way.
    If this was a server on the public internet that
    lots of people might encounter, I might be inclined
    to add a workaround to JavaMail. But since this is
    a private server that's clearly configured incorrectly
    and is clearly violating the protocol, I think the best
    thing to do is to get the server fixed.

  • JavaMail Installation Problem-Further Help Required

    Hi everyone, I am trying to install and configure JavaMail API and java activation framework so that I may start to try and write a Java Mail application, the problem I am having is that I am unable to get the sample program to work, I am compiling the sample program msgsend.java but I keep getting the following errors (I am using Jbuilder 2):
    Error (36): cannot access directory javax\mail.
    Error (37): cannot access directory javax\mail\internet.
    Error (209): class message not found in class msgsend.
    Error (210): class MessagingException not found in class msgsend
    Error (134): class Session not found in class msgsend
    Error (134): variable Session not found in class msgsend
    Error (139): class Message not found in class msgsend
    Error (139): class MimeMessage not found in class msgsend
    Error (141): class InternetAddress not found in class msgsend
    Error (145): cannot access class Message.RecipientType;neither class nor source found for Message.RecipientType.
    Error (146): Variable InternetAddress not found in class msgsend
    Error (148): cannot access class Message.RecipientType;neither class nor source found for Message.RecipientType.
    Error (149): Variable InternetAddress not found in class msgsend
    Error (151): cannot access class Message.RecipientType;neither class nor source found for Message.RecipientType.
    Error (152): Variable InternetAddress not found in class msgsend
    Error (162): Variable Transport not found in class msgsend
    Error (170): class Store not found in class msgsend
    Error (172): class URLName not found in class msgsend
    Error (172): class URLName not found in class msgsend
    Error (189): class Folder not found in class msgsend
    Error (195): Variable Folder not found in class msgsend
    Error (197): class Message not found in class msgsend
    Error (197): class Message not found in class msgsend
    I have installed JavaMail and java activation framework into the following directories on my hard dirive:
    JavaMail: C:\jdk1.3.1\lib\javamail-1.2
    java activation framework : C:\jdk1.3.1\lib\jaf-1.0.1
    My CLASSPATH is set to
    C:\jdk1.3.1\lib\javamail-1.2;C:\jdk1.3.1\lib\jaf-1.0.1
    I think that I have set this correctly, If not could somenone tell me what the CLASSPATH should be.
    If I have set it correctly, could anyone tell me another reason why I cannot run the sample programand tell me how I may be able to fix it.
    I have done a search on my computer for a file named javax\mail but it just says that javax is not a valid folder.
    Any help would be appreciated
    Thank You
    Noel

    >
    Noel, I have said it twice now... your classpath is
    supposed to be:
    C:\jdk1.3.1\lib\javamail-1.2\mail.jar;C:\jdk1.3.1\lib\j
    f-1.0.1\activation.jar
    /MichaelI have set the classpath to what you suggested but when I compile the msgsend.java sample I am still getting the same errors as before, the folder where javamail and JavaBeansTM Activation Framework are still in the same location also (C:\jdk1.3.1\lib\javamail-1.2 & C:\jdk1.3.1\lib\jaf-1.0.1).
    Can you tell me what is wrong?
    Thanks
    Noel

  • [JavaMail] : Decoding Problem

    I tried to use JavaMail method getContent() to extract the content of email messages. However, I found that some Chinese words cannot be shown probably. How can I treat this problem. Thanks

    There's a lot of things happening between getContent and displaying the message.
    How do you know the problem isn't in the displaying part of your application?
    JavaMail's job is to return you the correct Unicode characters. Converting those Unicode
    characters into the correct fonts so that they can be displayed correctly happens elsewhere.
    You need to find out whether you're getting the correct Unicode characters, without trying
    to display them. That will let you know whether the problem is with JavaMail (in which case
    the problem is almost always because the message was encoded incorrectly), or whether
    the problem is in the displaying of the correct characters (in which case you'll need to post
    your question to a different forum).

  • JavaMail - Pop3

    Hi to all.
    I have added mail.jar & activation.jar in my classpath
    When i run my "msgshow" application (from demo of JavaMail) then i get following error.-----------
    Exception in thread "main" java.lang.NoSuchMethodError
    at com.sun.mail.pop3.Protocol.<init>(Protocol.java:57)
    at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:108)
    at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:59)
    at javax.mail.Service.connect(Service.java:227)
    at javax.mail.Service.connect(Service.java:131)
    at msgshow.main(msgshow.java:108)
    Press any key to continue . . .
    My code is here.
    import java.util.*;
    import java.io.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    public class msgshow {
    static String protocol="pop3";
    static String host = "host";
    static String user = "uname";
    static String password ="pasword";
    static String mbox = "INBOX";
    static String url = null;
    static int port = -1;
    static boolean verbose = false;
    static boolean debug = false;
    static boolean showStructure = false;
    public static void main(String argv[]) {
    int msgnum = 4;
         int optind;
         for (optind = 0; optind < argv.length; optind++) {
         if (argv[optind].equals("-T")) {
              protocol = argv[++optind];
         } else if (argv[optind].equals("-H")) {
              host = argv[++optind];
         } else if (argv[optind].equals("-U")) {
              user = argv[++optind];
         } else if (argv[optind].equals("-P")) {
              password = argv[++optind];
         } else if (argv[optind].equals("-v")) {
              verbose = true;
         } else if (argv[optind].equals("-D")) {
              debug = true;
         } else if (argv[optind].equals("-f")) {
              mbox = argv[++optind];
         } else if (argv[optind].equals("-L")) {
              url = argv[++optind];
         } else if (argv[optind].equals("-p")) {
              port = Integer.parseInt(argv[++optind]);
         } else if (argv[optind].equals("-s")) {
              showStructure = true;
         } else if (argv[optind].equals("--")) {
              optind++;
              break;
         } else if (argv[optind].startsWith("-")) {
              System.out.println(
    "Usage: msgshow [-L url] [-T protocol] [-H host] [-p port] [-U user]");
              System.out.println(
    "\t[-P password] [-f mailbox] [msgnum] [-v] [-D] [-s]");
              System.exit(1);
         } else {
              break;
    try {
         if (optind < argv.length)
         msgnum = Integer.parseInt(argv[optind]);
         // Get a Properties object
         Properties props = System.getProperties();
         // Get a Session object
         Session session = Session.getDefaultInstance(props, null);
         session.setDebug(debug);
         // Get a Store object
         Store store = null;
         if (url != null) {
              URLName urln = new URLName(url);
              store = session.getStore(urln);
              store.connect();
         } else {
              if (protocol != null)
              store = session.getStore(protocol);
              else
              store = session.getStore();
              // Connect
              if (host != null || user != null || password != null)
                   System.out.println("host " + host + "port " + port + "\n user " + user + "\n password " + password);
              store.connect(host, user, password);
              System.out.println("afrer");
              else
              store.connect();
         // Open the Folder
         Folder folder = store.getDefaultFolder();
         if (folder == null) {
         System.out.println("No default folder");
         System.exit(1);
         folder = folder.getFolder(mbox);
         if (folder == null) {
         System.out.println("Invalid folder");
         System.exit(1);
         // try to open read/write and if that fails try read-only
         try {
              folder.open(Folder.READ_WRITE);
         } catch (MessagingException ex) {
              folder.open(Folder.READ_ONLY);
         int totalMessages = folder.getMessageCount();
         if (totalMessages == 0) {
              System.out.println("Empty folder");
              folder.close(false);
              store.close();
              System.exit(1);
         if (verbose) {
              int newMessages = folder.getNewMessageCount();
              System.out.println("Total messages = " + totalMessages);
              System.out.println("New messages = " + newMessages);
              System.out.println("-------------------------------");
         if (msgnum == -1) {
              // Attributes & Flags for all messages ..
              Message[] msgs = folder.getMessages();
              // Use a suitable FetchProfile
              FetchProfile fp = new FetchProfile();
              fp.add(FetchProfile.Item.ENVELOPE);
              fp.add(FetchProfile.Item.FLAGS);
              fp.add("X-Mailer");
              folder.fetch(msgs, fp);
              for (int i = 0; i < msgs.length; i++) {
              System.out.println("--------------------------");
              System.out.println("MESSAGE #" + (i + 1) + ":");
              dumpEnvelope(msgs);
              // dumpPart(msgs[i]);
         } else {
              System.out.println("Getting message number: " + msgnum);
              Message m = null;
              try {
              m = folder.getMessage(msgnum);
              dumpPart(m);
              } catch (IndexOutOfBoundsException iex) {
              System.out.println("Message number out of range");
         folder.close(false);
         store.close();
         } catch (Exception ex) {
         System.out.println("Oops, got exception! " + ex.getMessage());
         ex.printStackTrace();
         System.exit(1);
    public static void dumpPart(Part p) throws Exception {
         if (p instanceof Message)
         dumpEnvelope((Message)p);
         /** Dump input stream ..
         InputStream is = p.getInputStream();
         // If "is" is not already buffered, wrap a BufferedInputStream
         // around it.
         if (!(is instanceof BufferedInputStream))
         is = new BufferedInputStream(is);
         int c;
         while ((c = is.read()) != -1)
         System.out.write(c);
         pr("CONTENT-TYPE: " + p.getContentType());
         * Using isMimeType to determine the content type avoids
         * fetching the actual content data until we need it.
         if (p.isMimeType("text/plain")) {
         pr("This is plain text");
         pr("---------------------------");
         if (!showStructure)
              System.out.println((String)p.getContent());
         } else if (p.isMimeType("multipart/*")) {
         pr("This is a Multipart");
         pr("---------------------------");
         Multipart mp = (Multipart)p.getContent();
         level++;
         int count = mp.getCount();
         for (int i = 0; i < count; i++)
              dumpPart(mp.getBodyPart(i));
         level--;
         } else if (p.isMimeType("message/rfc822")) {
         pr("This is a Nested Message");
         pr("---------------------------");
         level++;
         dumpPart((Part)p.getContent());
         level--;
         } else if (!showStructure) {
         * If we actually want to see the data, and it's not a
         * MIME type we know, fetch it and check its Java type.
         Object o = p.getContent();
         if (o instanceof String) {
              pr("This is a string");
              pr("---------------------------");
              System.out.println((String)o);
         } else if (o instanceof InputStream) {
              pr("This is just an input stream");
              pr("---------------------------");
              InputStream is = (InputStream)o;
              int c;
              while ((c = is.read()) != -1)
              System.out.write(c);
         } else {
              pr("This is an unknown type");
              pr("---------------------------");
              pr(o.toString());
         } else {
         pr("This is an unknown type");
         pr("---------------------------");
    public static void dumpEnvelope(Message m) throws Exception {
         pr("This is the message envelope");
         pr("---------------------------");
         Address[] a;
         // FROM
         if ((a = m.getFrom()) != null) {
         for (int j = 0; j < a.length; j++)
              pr("FROM: " + a[j].toString());
         // TO
         if ((a = m.getRecipients(Message.RecipientType.TO)) != null) {
         for (int j = 0; j < a.length; j++)
              pr("TO: " + a[j].toString());
         // SUBJECT
         pr("SUBJECT: " + m.getSubject());
         // DATE
         Date d = m.getSentDate();
         pr("SendDate: " +
         (d != null ? d.toString() : "UNKNOWN"));
         // FLAGS
         Flags flags = m.getFlags();
         StringBuffer sb = new StringBuffer();
         Flags.Flag[] sf = flags.getSystemFlags(); // get the system flags
         boolean first = true;
         for (int i = 0; i < sf.length; i++) {
         String s;
         Flags.Flag f = sf[i];
         if (f == Flags.Flag.ANSWERED)
              s = "\\Answered";
         else if (f == Flags.Flag.DELETED)
              s = "\\Deleted";
         else if (f == Flags.Flag.DRAFT)
              s = "\\Draft";
         else if (f == Flags.Flag.FLAGGED)
              s = "\\Flagged";
         else if (f == Flags.Flag.RECENT)
              s = "\\Recent";
         else if (f == Flags.Flag.SEEN)
              s = "\\Seen";
         else
              continue;     // skip it
         if (first)
              first = false;
         else
              sb.append(' ');
         sb.append(s);
         String[] uf = flags.getUserFlags(); // get the user flag strings
         for (int i = 0; i < uf.length; i++) {
         if (first)
              first = false;
         else
              sb.append(' ');
         sb.append(uf[i]);
         pr("FLAGS: " + sb.toString());
         // X-MAILER
         String[] hdrs = m.getHeader("X-Mailer");
         if (hdrs != null)
         pr("X-Mailer: " + hdrs[0]);
         else
         pr("X-Mailer NOT available");
    static String indentStr = " ";
    static int level = 0;
    * Print a, possibly indented, string.
    public static void pr(String s) {
         if (showStructure)
         System.out.print(indentStr.substring(0, level * 2));
         System.out.println(s);
    Thanks..
    Bhavin Shah
    Yuou can mail me at [email protected]

    hello,
    pass the run time arguments containing protocol, user name etc as specified.
    Indrayani

  • Tomcat and JavaMail Sessions problem

    I'm using Tomcat (with struts). I've configured my web application in server.xml to manage JavaMail Sessions:
              <Resource name="mail/Session" auth="Container" type="javax.mail.Session"/>
              <ResourceParams name="mail/Session">
                   <parameter>
                        <name>mail.smtp.host</name>
                        <value>gandalf</value>
                   </parameter>
              </ResourceParams>
    Also, I've configured my web application deployment descriptor (web.xml) to use this resource:
    <resource-ref>
         <description>JavaMail Resource</description>
         <res-ref-name>mail/Session</res-ref-name>
         <res-type>javax.mail.Session</res-type>
         <res-auth>Container</res-auth>
    </resource-ref>
    Now in the Java code I try to get the JavaMail session in this way:
    private Context devuelveContexto() throws javax.naming.NamingException
    initContext = new InitialContext();
    return (Context) initContext.lookup("java:/comp/env");
    public javax.mail.Session devuelveSesionMail()
    throws javax.naming.NamingException
    Context envContext = devuelveContexto();
    javax.mail.Session mailSesion = (javax.mail.Session) envContext.lookup("mail/Session"); <--- this throws an exception
    I'm doing all like is explained in Tomcat help web page 'JNDI Resources HOW-TO' but it doesn' work for me.
    The exception raised is this:
    java.lang.reflect.InvocationTargetException: java.lang.ClassCastException: javax.mail.Session
         at com.aplicacionesweb.evaluaciones.ddbb.CargadorRecursos.devuelveSesionMail(CargadorRecursos.java:76)
         at com.aplicacionesweb.evaluaciones.fases.actions.ConcertacionAction.enviarCorreo(ConcertacionAction.java:562)
         at com.aplicacionesweb.evaluaciones.fases.actions.ConcertacionAction.grabarConcertacion(ConcertacionAction.java:510)
         at java.lang.reflect.Method.invoke(Native Method)
         at org.apache.struts.actions.DispatchAction.perform(DispatchAction.java:236)
         at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
    Please help.

    Problem solved. I had 'mail.jar' and 'activation.jar' in 'WEB-INF/lib' directory, causing a classes conflict.

  • Nokia 6233 pop3 problems !!!

    i have a problem trying to connect to my companies pop3 server on which i'm using ssl - port 995..
    so i'm always getting message "check failed" - and in details it says "certificate not present"..it doesn't ask me anything to accept..just this error..does anyone have a clue or solution..
    regards..

    11-Feb-2008 09:09 AM
    amircygmira wrote:
    If I update my phone software will this problem go away?
    It should fix it.
    www.nokia.com/softwareupdate
    If it doesn't fix it visit a nokia care point/service centre.
    Care points:
    UK
    http://www.nokia.co.uk/A4228006
    Europe:
    http://europe.nokia.com/A4388379
    Elsewhere:
    http://www.nokia.com and select your country.

  • POP3 problems Peterchurch area (01981) ??

    Hello,
    My first post on the forum so please excuse any errors.
    I look after the computer and internet equipment belonging to two elderly ladies. Both are in the (01981) exchange and both have BT Broadband Option 1. For the last two days they have both had intermittent problems collecting their email by POP3. I have been monitoring this from my computer by setting up POP3 connections on my own computer using their details. (I an 400 miles away). There is no problem with webmail, so I know their email addresses and passwords are OK. However, when I look at the diagnostics at my end it is the POP3 password that is intermittently failing for both accounts. It seems a coincidence that they are both on the same exchange and both suffering intermittent problems.
    Can anybody help? The ladies are not able to handle a technical phone call, and I am not due to visit them for some months. If there is a known problem in the Peterchurch area which will be fixed soon that would be great to know and I could put their minds at rest.
    Thanks
    Solved!
    Go to Solution.

    gterry wrote:
    Hello,
    My first post on the forum so please excuse any errors.
    I look after the computer and internet equipment belonging to two elderly ladies. Both are in the (01981) exchange and both have BT Broadband Option 1. For the last two days they have both had intermittent problems collecting their email by POP3. I have been monitoring this from my computer by setting up POP3 connections on my own computer using their details. (I an 400 miles away). There is no problem with webmail, so I know their email addresses and passwords are OK. However, when I look at the diagnostics at my end it is the POP3 password that is intermittently failing for both accounts. It seems a coincidence that they are both on the same exchange and both suffering intermittent problems.
    Can anybody help? The ladies are not able to handle a technical phone call, and I am not due to visit them for some months. If there is a known problem in the Peterchurch area which will be fixed soon that would be great to know and I could put their minds at rest.
    Thanks
    Hi gterry.
    There is currently a problem with email access at present, but showing against varous email accounts, and seemingly random in nature.
    I believe that one or more of the backend load balancing servers is sick, faulty or under severe overload - hence causing the email problems many people are seeing (reports in forums and newsgroups confirms this).
    http://www.andyweb.co.uk/shortcuts
    http://www.andyweb.co.uk/pictures

  • JavaMail classpath problems...

    Hi there,
    I have coded a function that will send an email. The code compiles perfectly in the command line and i have the mail.jar file placed in the C:\j2sdk1.4.2_12\lib\javamail-1.3 folder and the activation.jar file placed in the C:\j2sdk1.4.2_12\lib\jaf-1.0.2 folder with the classpaths set in the environment variables. Everytime i go to run the program i get the "java.lang.NoClassDefFoundError: javax/mail/Session" error in the console. It clearly can't find the Session.class for some reason. Anybody have any ideas what I can do to fix this?
    (I have the jar files installed on the server that my application is located on)
    James
    Edited by: JamesAL on Jun 19, 2008 3:53 AM

    I'm running it on a web server. It's part of an application on which orders can be placed. The email is basically a little confirmation email after the order is successfully placed. I have the classpath set for the neccessary jar files on the webserver in the Environment variables and also have the imports at the top. I am using JavaMail 1.3 and Java SDK 1.4 and it has been suggested there could be some sort of bug when trying to use this version of JavaMail with this version of Java. Do you think that is a possibility?
    The function is located in the same .class file from which it is called (so its called internally) rather than it being located in the WEB-INF folder in tomcat. Would that make a difference?

  • Javamail API problem

    I recently downloaded the javamail 1.4 api, nd tried testing the demo code sendmsgsample.java. It gave me the following error -
    C:\jdk1.3\bin\msgsendsample.java:78: cannot access javax.mail.Session
    bad class file: C:\javamail1.4\lib\mailapi.jar(javax/mail/Session.class)
    class file has wrong version 48.0, should be 47.0Please remove or make sure it appears in the correct subdirectory of the classpath.
         Session session = Session.getInstance(props, null);
    help?

    This is the code we're using (it's an example code we're trying to get to run so we can see what's going on)
    import java.util.*;
    import java.io.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    public class msgsendsample
         public static void main(String[] args)
         String to = "[email protected]";
         String from = "[email protected]";
         String host = "mail.ejip.net";
         // create some properties and get the default Session
         Properties props = new Properties();
         props.put("mail.smtp.host", host);
         //sending uses a Session Object so, lets create one
         Session session = Session.getDefaultInstance(props, null);
         try {
              // create a message
              Message msg = new MimeMessage(session);
              msg.setFrom(new InternetAddress(from));
              InternetAddress[] address = {new InternetAddress(to)};
              msg.setRecipients(Message.RecipientType.TO, address);
              msg.setSubject("PittJUG Welcome");
              msg.setSentDate(new Date());
              msg.setText("Hello Carl.\nPittJUG Welcomes you!.");
              Transport.send(msg);
              catch (MessagingException mex)
                   System.out.println("\n--Exception handling in msgsendsample.java");
                   mex.printStackTrace();
    }the error we get is:
    com.sun.mail.smtp.SMTPSendFailedException: 550 5.7.1 Mail from 124.125.89.30 ref
    used - see http://www.spamhaus.org/SBL/and http://www.spamhaus.org/xbl/
    at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1
    388)
    at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
    at javax.mail.Transport.send0(Transport.java:169)
    at javax.mail.Transport.send(Transport.java:98)
    at msgsendsample.main(msgsendsample.java:27)

  • Nokia messaging - Telia Pop3 problem

    I have created  a Nokia messaging account with two mail account with success.
    But adding my Telia pop2 account fails. It seems that the Telia pop3 server "mailin.telia.com" cannot be accepted.
    Any hints would be appreciated.
    Best regards,
    Tobbe

    Filed a bug report for this. Thanks,
    -Davis 

  • JavaMail newbie problem

    Hi
    JDK V1.5.0_03
    JavaMail v1.3.2
    JAF v1.0.2
    Eclipse v3.0.2
    I'm trying to write my first program with JavaMail. I believe I've downloaded the correct pieces, and have set up Eclipse correctly. I can't correct the following errors:
    import java.util.Properties;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    public class testmail {
         Properties props = new Properties();
         props.setProperty("smtp.foo.edu", "smtpHost");
         props.put("mail.smtp.host", smtpHost);
    Severity     Description     Resource     In Folder     Location     Creation Time
    2     Syntax error on token(s), misplaced construct(s)     testmail.java     MCIS 686 Project     line 8     June 3, 2005 12:36:48 AM
    2     Syntax error on tokens, delete these tokens     testmail.java     MCIS 686 Project     line 8     June 3, 2005 12:36:48 AM
    2     Syntax error on token ""mail.smtp.host"", invalid FormalParameterList     testmail.java     MCIS 686 Project     line 9     June 3, 2005 12:36:48 AM
    2     Syntax error on token "smtpHost", VariableDeclaratorId expected after this token     testmail.java     MCIS 686 Project     line 9     June 3, 2005 12:36:48 AM
    2     Syntax error on token(s), misplaced construct(s)     testmail.java     MCIS 686 Project     line 9     June 3, 2005 12:36:48 AM
    I looked at java.util.Properties, and see that the 'put' method is no longer supported. But, I'm not (apparently) feeding the right stuff to the setProperty, which is supported.
    Thanks very much for the advice!
    tl

    In this line catch (internet.AddressException e)
    you have a non-existent package "internet".
    The correct package for that error is[b] javax.mail.internet; since you have imported this package, you can just delete the invalid information, like this:
    catch (AddressException e)

Maybe you are looking for

  • Excise tab not appearing for non cenvatable po

    Hi All,         while doing MIGO , the excise TAB is appearing for cenvatable items. but in case of non -cenvatable item this TAB is not appearing in MIGO, is it like this. i have maintained in J1ID the excise material type as non-cenvatable. the exc

  • Recording radio programs

    Is there a way to record live radio (not podcasts) onto the touch? There are some shows that run in the middle of the night that I would like to record to listen to at a later time. Thanks for your help.

  • Is there an easy way to find out if the GPIB/ENET adapter is connected to the computer?

    I'm using Component Works for Visual Basic and have no problem with my software on computers with PCMCIA GPIB adapters. The GPIB driver seems to know if the adapter is in the computer or not. When my software is used on a computer where the GPIB/ENET

  • Adobe Reader XI - plug-ins

    I cannot get my plugin(api) to show up in the tools menu, it works in the previous versions on Adobe Reader. Do I need to get my plug-in certified to work?

  • Need an spare part for my Portege Z830-10E

    Anyone know the ID, ore where i can get the part near the Display? I cant find it anywhere, and i lost it, becourse a screw gos out :( https://www.dropbox.com/s/q2aj21xzwpcvl25/IMG20141011105220_1.jpg?dl=0 Its a Z830-10E