Access pop3 server

hii,
I'm using java mail api to access pop3 server and doing like :
public void accessSrv()
        Session session = null;
        Store store = null;       
       try
           session = Session.getDefaultInstance(System.getProperties(), null);
           store = session.getStore("pop3");
           store.connect("host", "username","password");       
           System.out.println("Srv connected...");
       catch(Exception E)
           E.printStackTrace();
    }Here an exception is being occured..
javax.mail.AuthenticationFailedException: EOF on socket.
could you else please tell me the solution...
thanks
Dev

ejp wrote:
Without a connection, that exception is entirely impossible.
Connection problems are usually no code problem, but rather a configuration problem. For example: is your firewall blocking the connection?The firewall can't have anything to do with it.
Don't be so sure. Some firewalls are configured in the weirdest of ways, and may allow the connection to be made but not data to be sent over that connection (or only very specific types of data).
I once encountered one that would allow all (and only) http traffic as long as the filenames (thus the URIs) ended with .htm, ,gif, or .jpg (and only those extensions).
Obviously intended to stop downloading of zip files and executables, it caused major problems when visiting just about any dynamic website or website (and many others, including the company's own website).
@OP: I suspect the server you connected to wasn't a POP3 server, or possibly that you failed authentication by not providing a correct username or password.Would that lead to an EOF trying to read a message from the server?
I'd expect some sort of security exception instead.
EOF to me indicates that something is coming over the line but it's either not a POP message or the reader is failing to stop attempting to read when reaching the end of it.

Similar Messages

  • Problem to access POP3 of MS Exchange Server using Java Mail

    {color:#0000ff}Hi,
    I have a requirement to read emails from my office mailbox using POP3 protocol which is in Microsoft Exchange Server.
    My code is given below.{color}
    {color:#0000ff}*package emailadaptor;*
    import java.util.Properties;
    import javax.mail.Session;
    import javax.mail.Store;
    *public class Test {*
    *public static void main(String[] args) {*
    * // POP3 server name of Exchange Server*
    * String host = "popServer.domain.com";*{color}
    {color:#0000ff}*
    * // User name*
    * String user = "domainName\\userName";*
    * String password = "password";
    * // Get a session. Use a blank Properties object.*
    * Session session = Session.getDefaultInstance(new Properties());
    * try{*
    * // Get a Store object*
    * Store store = session.getStore("pop3");*
    * store.connect(host, user, password);*
    * }catch(Exception e){*
    * e.printStackTrace();*
    *{color:#0000ff}I can ping popServer.domain.com from my machine where I am testing the code.*
    For username I have tried with domainName\\userName and username pattern both but unsuccessful. For example if my username if user1 and my domain name is domain1 than the two patterns I have tried are ‘domain1\\user1’ and ‘user1’.
    For both these cases I am getting same error, and below is my error stack Trace.
    *{color}*
    *{color:#ff0000}javax.mail.AuthenticationFailedException: The requested mailbox is not available on this server.*
    at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:158)
    at javax.mail.Service.connect(Service.java:291)
    at javax.mail.Service.connect(Service.java:172)
    at emailadaptor.Test.main(Test.java:19)
    *{color}*
    *{color:#0000ff}Please give me some idea and steps what is wrong with this code and if any other information is needed then also let me know that.*
    Please help.
    Regards,
    *Gourab{color}
    *{color}

    Turn on session debugging. What does the protocol trace show?
    Are you able to connect with other mail clients, such as Thunderbird?
    (Outlook doesn't count.)

  • POP3 server emails stopped after new update of 503

    Last week messge appeared on screen that new update version (14.0.4) available for your mobile Asha 503. I select yes to upgrade my phone from older version to new. after upgrade procedur my office POP3 server email stopped & not working from that time. i contact to my office network administrator to check any possibility to enable my email but he asked me there is no any chance to receive my email because he tried lot of time to re configure but it vain. please help

    The easiest way to track this is: Capture the network traffic! This can be done via a:
    A) Wi-Fi access point which allows capturing. Alternatively, you go for a
    B) Ethernet Switch behind the Wi-Fi access-point which allows port mirroring. A third alternative is to
    C) install Connectify on a computer and use that as capturing Wi-Fi access-point
    for your Nokia Asha 503.
    In all cases, you use tools like Wireshark to analyze the data traffic. However, because you are in contact with your administrator already: Does he see any data packet from your Nokia Asha 503 at all? If not, the Internet configuration could have been damaged while updating. Nokia Xpress browser is using a slightly different configuration, therefore it might not be affected.

  • How can i recieve unread message from pop3 server

    hi ! i'm using pop3 server
    I used the following code to set read message.
    String host="servername";
    String username="xx.domainname";
    String password="xxxxxx";
    try
    Session mySession=Session.getDefaultInstance(System.getProperties(),null);
                   mySession.setDebug(true);
              //get a specific mail storage
          myStore=mySession.getStore("pop3");
    // Store myStore=(Store)session.getAttribute("myStore");
    myStore.connect(host,username,password);
    myFolder= myStore.getFolder("INBOX");
    if (myFolder == null)
                        System.err.println("No inbox folder is available");
                   else
                        System.out.println("Accessing"+ myFolder.getFullName()+"folder========" );
                   myFolder.open(Folder.READ_WRITE);
    Message[] message=myFolder.getMessages();
      message.setFlag(Flags.Flag.SEEN,true);
    System.out.println("Flags ========: "+message[i].getFlags());
    myFolder.close(true);
    myStore.close();
    catch(Exception e)
    Again if i receive  message from server it is not showing unread messages. it will return as 0.(I used the  method *getUnreadMessageCount()*)
    Can i have some help
    Thanks in advance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    The POP3 protocol supports no flags.
    See the FAQ and the javadocs for the com.sun.mail.pop3 package.

  • Work around for iPhone POP3 Server Problems

    A common problem that people seem to be having (checking other discussion forums) is that once an e-mail account is active on the iPhone, they have real problems sending e-mails for that account from their Mac or PC. I had that problem too. After some technical research, here is the cause:
    1. Your e-mail service provider's POP3 server runs a simple UNIX protocol that only allows a single client to access it at a time - i.e. the PC/MAC mail client or the mobile device, but never both at the same time.
    2. Provided that the PC/MAC mail client and the mobile mail client don't access the POP3 server too often and that they are quick, then it's not a problem.
    3. If they check too often or are slow to release the POP3 server, then obviously the probability of clashes and lockouts increases.
    4. There is quite a bit of discussion on the web that points to the iPhone not releasing the POP3 server quickly - in fact it can hang on for a long time
    5. This results in the PC e-mail client reporting incorrect password constantly, driving you nuts (that's tech talk)
    BUT HERE IS A SIMPLE, FLAWLESS WORKAROUND:
    1. You create a new e-mail account for myself (either with your existing provider, or a free provider like gmail)
    2. You configure your main e-mail account to send a copy of incoming e-mails to that new e-mail account (whilst retaining a copy for the main account) - most paid service providers will let you do this.
    3. You do NOT set that new account up on your PC/MAC e-mail client, only on your iPhone. When you do that, in the POP Account Information" panel, you use your main e-mail address and not your new, duplicate address. In the "Incoming MAil Server" section of the set up, you use the username/password of the new, duplicate account. That way you receive stuff from that account, but when you send, it comes from your main account. Cool huh?!
    4. That way, it doesn't matter how long the iPhone hangs on to the account - it's simply a duplicate account that no other client comes along to access. Ever.
    5. Outgoing mail is not a problem, since this fault does not exist with the SMTP server protocol, only with the incoming POP3 server.
    ENJOY!

    Hi Jeff
    Well Jeff, I must bow my head in shame.  I've had this love and  hate relationship with Adobe for many years, and don't even mention the name Matrox in the same sentence or I will go off the wall! However, this is apparently operator error.  Man do I feel like an idiot!  (Sorry Adobe for being so nasty with you.  Peace!) 
    The bottom line is, Black Magic does not, and has never claimed to support Encore.
    If I would of read all of the installation instructions I would of seen that.  Here is a list of the 3rd party software that the Intensity pro does support.  I've seen this list several times, but never really looked for Encore in that list of apps.  I guess I just assumed that if it worked in Premiere Pro, that it would also work in Encore especially Since Encore is Married to Premiere Pro.  Then the other thing that helps to confuse the issue is that Black Magic is one of the external options which show up inside Encores Audio/Video output preferences.  One would just assume if it showed up there, that it should work, but that's not the case.
    Third Party Software Support
    • Apple Final Cut Pro 7
    • Apple Motion 4
    • Apple Soundtrack Pro 3
    • Apple Color 1.5
    • Apple DVD Studio Pro 4
    • Apple Final Cut Pro 6.0.5
    • Apple Motion 3.0.2
    • Apple Soundtrack Pro 2.0.2
    • Apple Color 1.0.2
    • Apple DVD Studio Pro 4.2.1
    • Adobe After Effects CS4
    • Adobe Photoshop CS4
    • Adobe Premiere Pro CS3 v3.2
    • Adobe After Effects CS3 8.0.2
    • Adobe Photoshop CS3 10.0.1
    • Steinberg Nuendo 3.2
    • Digidesign Pro Tools 8
    The Intensity pro works fine for an HDMI output device inside of Final Cut though, sure with it would would work in Encore.  I called and spoke with Black Magic Support, they confirmed that I was a idiot.  Oh well, there's always a chance I may not be wrong, got to check it out!  LOL

  • Unable to Access SQL Server 2005 Remotedly

    Not sure if this is the right forum to post this...
    After going through lot of old posts in various forums and changing lot of settings, i'm still not able to access my Server remotely.
    This is Windows 2003 Server machine with Sonicwall Firewall, i have allowed Port 1433 in both Firewall and ISA and call is getting through but i'm getting following error msg :-
    {"An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"}
    This machine is also having Sql Server 2000, and the SQL Server 2005 is installed with named instance.
    My connection string is :-
    "Data Source=192.168.0.1\MYSERVER;Initial Catalog=MyDatabase;Integrated Security=True"
    In example above, i'm showing dummy values but actual string is having the actual live IP address and correct named instance and database.
    If i use a local address like 192.168.0.1 then i'm able to connect.
    My TCP/IP Address in Sql configuration is having my Live IP Address and the port 1433.
    Any help will be highly appreciable..

    i'm still checking on this. i have changed the port now to 1434 and changed in all places.
    my connection string is also changed now, so now i'm using :- MYIP\MYSERVER,1434
    now i'm getting a different error msg
    {"An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)"}
    this can also be due to firewall or something else is blocking it, i will rechk n post back final answer.

  • Suddenly cannot connect to server "you do not have permission to access the server"

    I am one of only two Macs in our office.
    Up until now I have been able to connect to our shared folders/server just fine. Occasionally and randomly I would seem to get booted off, but would just log back in.
    Now suddenly I get "Connection Failed You do not have permission to access this server".
    I seem to get it whether its cifs, afp or smb.
    After it denies the connection it also boots me from email. As soon as I cancel the attempt to connect the email recognizes my password again.
    I have tried rebooting, repairing permissions and having our network admin change my password and nothing seems to work.
    If I enter an incorrect pw it recognizes it as such. I only get the above message when I use the correct username and PW.
    Additionally if I go to the other mac in our office I am able to connect using the same credentials without any problem.
    This is via ethernet.

    i also got the same problem on my ipad i have tried every thing i dont knw hw to fix this problme any solution. ???????????????????????????????????????????????????

  • How can i access dmz server via public ip from inside?

    hi all !
    As shown in Figure,how can i access the server in dmz zone via public?
    i can access it via private ip 192.168.1.1 now,but i can't access it via 101.100.1.2.
    who can help me ?
    thank you !

    Hi,
    You would have to configure Static NAT from DMZ to INSIDE for the server in the same way you have done for DMZ to OUTSIDE.
    Basically in the following way for example
    object network DMZ-WEB
    host 192.168.1.1
    nat (dmz,inside) static 101.100.1.2
    This would enable your users on the "inside" to access the "dmz" server with the public IP address. And naturally only with the public IP address after this NAT.
    Hope this helps
    Please do remember to mark a reply as the correct answer if it answered your question.
    Feel free to ask more if needed
    - Jouni

  • How can I block Server Admin from accessing a server?

    I've got a G5 FTP server running Server 10.5.7 that sits outside our firewall. Oddly I find that I can enter the IP and login info via Server Admin and voila - I have access. All sharing services are off and all remote access services in System Prefs are off. I want this system totally locked down except for the FTP server app I run. What do I need to kill to prevent access via Server Admin? Or anything else for that matter?
    My concern is that via Server Admin someone could really mess things up and of course turn on services that would grant them full access.
    Thanks

    Oh sorry - I put this in the wrong category.
    I'll duplicate this in the 10.5 section

  • For a SharePoint list LVWP - how to open links in new window? (Without SPD - Without access to server)

    Hi there,
    I canNOT use SharePoint Designer nor do I have access to server to change any 14 hive files.
    I have a SharePoint 2010 List with a field of type Hyperlink. I need these links to open in New Window. Only links with-in this LVWP should open in new window (and not links on Quicklaunch or top nav).
    Any clues how to achieve this please? JS is okay.
    Thanks.

    Hello,
    The good news is that you're not the first to have those requirements!
    Here's the JavaScript:
    <script>
    var allLinks = document.querySelectorAll("table.ms-listviewtable tr td a");
    for(var i=0; i<allLinks.length; i++){
    if(allLinks[i].onclick == null){
    var targetUrl = allLinks[i].href;
    targetUrl = targetUrl.indexOf("?") > -1 ? targetUrl + "&isDlg=1" : targetUrl + "?isDlg=1";
    allLinks[i].href= "javascript:var options = {width:500, height:300, url:'"+targetUrl+"'}; SP.UI.ModalDialog.commonModalDialogOpen('"+targetUrl+"', options);";
    </script>
    This script can be saved to a text file and uploaded to a document library. You can then add a content editor web part below your list view web part (so that it doesn't execute until after the list view has loaded) and set the "content link"
    property of the web part to be the path to the uploaded text file.
    The solution was originally posted here:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/8ca275df-1d9c-4d0f-a624-c0531fda069a/how-to-open-model-dialog-onclick-of-list-item-hyperlink-column?forum=sharepointdevelopmentprevious

  • Windows server 2008 R2 x64 Authentication failure while try to access Windows server 2003 R2

    Hello,
    I try to access Windows Server 2003 R2 Standard from Windows Server 2008 R2 x64 standard using integrated windows authentication . And because my application tries to read SQL server i'm getting and error that user is not trusted. Then I tried to open a
    simple shared folder on  2003 and none of the users is able to do it. Both servers are part of common workgroup in the same IP range. Using domain is not an option. Migrating 2003 to 2008 is not an option either. The specific DB provider I have to use
    supports only windows authentication, so creating user into SQL server is not an option too. I have tested many applications and cases which requires/uses windows authentication and non of the manage to connect.
    Any help is very welcome because things are urgent!
    Authentication failure

    That method in workgroup mode may be a problem.
    Authentication in SQL Server
    Might ask them over here.
    SQL Server forums on
    MSDN
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Error in reading the mails from POP3 server

    Hi,
    I am reading mails from the POP3 server using UTL_TCP package. I am able to retrieve .txt & .doc attachments successfully.
    I am facing an error when I try to retrieve an attachment with a very long name (irrespective of the file type). Also, I am unable to retrieve .docx, .xls, .xlsx file types. I noticed similarity in the reasons for the error I am getting. I realized that if I try to retrieve an attachment with a very long file name or any of the above mentioned file formats (.docx, .xls, etc.), the "name" attribute of the attachment goes to the next line and hence I am going wrong somewhere in parsing that line.(The complete line comprises of : Content-Type: application/vnd.openxmlformatsofficedocument.wordprocessingml.document; name="test_attachment.docx")
    I realized this pattern by doing executing Telnet commands to retrieve emails from POP3 server.
    I am trying to parse the line I am talking about in the following manner:
    IF line LIKE 'Content-Type: %;'
                   THEN
                        IF line LIKE 'Content-Type: %; name=%'
                        THEN
                             PIPE ROW (line);
                        ELSE
    -- This should only print the "Content-Type". But I get an error (pasted below) at this point
                             PIPE ROW (line);
    -- To read the "name" attribute which comes on the next line. But this line never gets executed since I get an error in the previous statement
                             BYTES := UTL_TCP.available (socket);
                             BYTES := UTL_TCP.read_line (socket, line);
                             PIPE ROW (line);
                        END IF;
    The error I get is :
    ERROR:
    ORA-29261: bad argument
    ORA-06512: at "SYS.UTL_ENCODE", line 29
    ORA-06512: at "SYS.UTL_ENCODE", line 251
    ORA-06512: at "SCOTT.POP3", line 117
    Message was edited by:
    Monk
    Message was edited by:
    Monk

    Hi,
    Try to manually download the file from application server using standard transactions, and than check how many records are you able to download from app. server.
    I guess there might be something wrong with the format of 583rd record, which makes sap assume that the file has come to an end.
    Hope this will help you.
    Regards,
    Vinit...

  • How do i solve - cannot access web server - error message when creating a project in 4.5 with PHP

    How do i solve - cannot access web server - error message when creating a project in 4.5 with PHP

    Screenshot of how it looks when i try to show a ms access form inside a iframe:
    http://oi58.tinypic.com/2vj4ish.jpg

  • How do I configure snow leopard server to allow local client to access the server using its public domain name

    I have SLS 10.6 running on my local network with DNS configured.
    I can access the server from a client on the lan using server.local or server.domain  where domain name is my publically registered domain,
    From the internet I can access my server using the registered domain name i.e. www.domain.com. 
    Is it possible to set my server up so that www.domain.com  also reaches the server when used by a client locally?   At present I get a page not found error.

    The configuration you're aiming for is called split-horizon or split-brain DNS, and it's quite possible.  It can get slightly hairy when you have different stuff using the same host name for different purposes, for instance, and you'll need to track all external DNS entries in your internal DNS server when you're running "split". 
    Here is how to set up DNS services.   Split-horizon is one of the options listed there.
    My preference is to use a different domain or subdomain within the network, and to avoid using split-horizon where I can reasonably manage it.  One domain name is configured for and reachable outside and is effectively public, and the other domain (or a subdomain) is inside and private and only reachable directly or via VPN, for instance.

  • Entity Framework - Code First - Migration - How to access SQL Server and Oracle using the same context?

    Hello,
    I use Entity Framework code first approach.
    My project is working fine with SQL Server. But, I want to access Oracle too. I want to switch SQL Server and Oracle in run time.
    I am able to access Oracle using "Oracle.ManagedDataAccess.EntityFramework.dl" in a new project.
    But, Is this possible to access SQL Server and Oracle in the same project.
    Thanks,
    Murugan

    This should be possible with a Code-First workflow.  In Code-First the database mapping layer is generated at runtime.
    David
    David http://blogs.msdn.com/b/dbrowne/

Maybe you are looking for

  • Adobe Media Encoder CS5.5 Mac Will Not Open!

    As of late, my AME has not been able to open at all. I really don't know how this happened. My specs Macbook Pro 13" Mid 2010 model Processor 2.4GHz Intel Core 2 Duo 4GB Ram Mac OSX 10.8.3 I keep having crash errors reported bad access. And then I tr

  • Scope for data warehousing ETL Tool

    Hi all can anybody explain scope for data warehousing ETL Tool for oracle developer in future this is ok or.. regards Message was edited by: 174313

  • Ibooks automatically shutsdown when i open it please help

    Hi, I just updated to the lates ibooks app. Now when i open the ibooks app it automatically shuts down within 3 seconds of opening. Please help me. Miguel

  • Adobe Dreamweaver cc 2014 "software license agreement" poping up before Run :(

    Hi Guys ... I set up Adobe Dreamweaver cc on my windows 8.1 every thing is fine after instal but when I want to run it the " software license agreement " displays repeatly after I press "Accept" button I've done most recommend ways in internet that w

  • Country ,state and city checklist XML by JAVA

    Hi friends, I have textboxes for entering the country ,state and city values and all these 3 fields are related by primary/foreign keys. I wan now store and retrieve values entered by users for country state and city by xml files .I also wan all thes