How to correctly set the JavaMail delay

I use JavaMail to connect to a POP3 server.

In addition, I put the following properties, so that JavaMail will not wait for long if a mail server does not:

props.setProperty ("mail.pop3.connectionpooltimeout", "3000");
props.setProperty ("mail.pop3.connectiontimeout", "3000");
props.setProperty ("mail.pop3.timeout", "3000");

However, in some cases, the time-out works fine but sometimes JavaMail freezes for minutes (!) with the following debug message:

DEBUGGING POP3: connection to the host 'pop3.yahoo.com', port 110, false isSSL

Change the ports or protocols (SSL, TLS) has no effect. I guess that the host simply does not exist.

For example, if I query pop3.yahoo.com instead of pop.mail.yahoo.com (that would be the right hostname), I have to wait long until it happens a timeout exception.
After several minutes, I get the following exception and the application continues to run:

java.net.ConnectException: operation timed out

POP3.Yahoo.com seems to exist, but will not respond:

localhost: ~ me$ ping pop3.yahoo.com
PING pop3.yahoo.com (206.190.46.10): 56 bytes
Request timeout for icmp_seq 0
Timeout for icmp_seq request 1
Timeout for icmp_seq request 2
Request timeout for icmp_seq 3
* ^ C *

You may be wondering why I use pop3.yahoo.com instead of pop.mail.yahoo.com.
Well, I just wanted to test what happens if my application user inserts an incorrect host name.

I think that this question is related to this http://www.opensubscriber.com/message/[email protected]/180946.html report where the poster says that the problem occurs if the e-mail server closes the connection. JavaMail seems so long (don't know why).

Given that the issue has not been resolved in the link I posted: does anyone know how to fix or at least debug this?

Any help would be really appreciated!

So now we know the problem is probably related to the encoding of your application and do not do
JavaMail himself. If you can't figure it out by comparing msgshow.java with your code, after the
the relevant parts of your code, or send them to me at [email protected].

Tags: Java

Similar Questions

  • How can I set the default download locations

    How can I set the default download locations?

    You can watch here:

    • Tools > Options > general: downloads
  • How can I set the time axis on my waveform table to show run time that is to say whenever I start the program I should have 0 as the starting point

    How can I set the time axis on my waveform table to show run time that is to say whenever I start the program I should have 0 as the starting point. I've been messing around with the without success. I'm under Labview 2012.

    Thank you!

    Townes wrote:

    I can't understand what you mean. I have no formal training with labview. It took me a long time to write the simple program that I joined. Any guidance would be greatly appreciated!

    Its pretty normal for a beginner to take the time to write code. Right-click the map of waveform > Create > property node > historical data, you will get a property node, keep this at the beginning of the code and create a constant. You can also go to the VI properties and > run and select "clear indicators when it is called.

    I recommend you to go through the basic materials of LabVIEW which will give you an understanding on the basics of bases/components of LabVIEW.

  • How can I set the default font size and type for the outgoing Hotmail mail?

    How can I set the default font size and type for the outgoing Hotmail mail?

    Hi Dale,

    What is the email client do you use?

    Outlook can be configured per - start Outlook-> Tools-> Options-> mail-> fixed Format and fonts... Select the font and size you need... Click ok on all screens.

    I hope this helps.

  • How do you set the time and date on fax for hp officejet 4622

    How do you set the date and time on the fax for hp officejet head 4622

    Hi Chrisharrison23,

    Date and time should be under configuration tools or fax setting in the printer control panel.

    OfficeJet 4620:

    1. click on the key icon on the control panel of the printer

    2. go to tools

    3 scroll to the date and time

    I would like to know if you are able to locate the setting?

    Officejet 4622: Set the date and time

     
  • Sleep Timer Pavillion DV 7 - How do you set the timer for a different time setting?

    Sleep Timer Pavillion DV 7 - How do you set the timer for a different time setting?

    Hello Pidcock,

    Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the Forums of HP, I would like to draw your attention to the Guide of the Forums HP first time here? Learn how to publish and more.

    I understand that you want to change on your computer sleep timer. I'll be happy to answer that question for you. Now you have not specified what operating system you are using, so I guess it's the same operating system provided with your computer (Windows 7). I will provide you the HP support document: Management of power (Windows 7 and Vista) Options, which will guide you in how to set the power of your laptop. Just in case you have upgraded to Windows 8 I am also including the HP Support document: Manage the power (Windows 8) Options. This document will guide you through the same steps in Windows 8.

    I hope that I have answered your question to your satisfaction. Thanks for posting this question on the Forums of HP. Have a great day!

  • How can I set the format of Windows Media Center at 16:10 in other than the full screen?

    How can I set the format of Windows Media Center in Vista at 16:10 in other than the full screen? I use a screen as secondary display 1680x1050px.

    Hello, YPOC

    It is not possible to change the proportions for Media Center in windowed mode.

    The aspect ratio has been changed in Windows 7 and uses a format screen mode to windowed.

  • I have my printer connected to my router via a usb cable... I also have my (Vista) computer connected to the router by ethernet cable. How can I set the computer to print on my prints through the router?

    I have my printer connected to my router via a usb cable. I also have my (Vista) computer connected to the router by ethernet cable. How can I set the computer to print to my printer via the router?

    Usually, you need to install the printing software / drivers on your PC, configured / installed specially for a printer "remote" (its an option in the installation of the printer software)

  • How can I set the time on the toolbar of the low wing? When I click on the taskbar do a right-click and then click Properties, it does not give me the option to display the time?

    How can I set the time display on the toolbar of the low wing?  When I click with the right button on the taskbar, and click show properties, it does not give me the options to display the time?  Where should I go in windows 7 to do this?  I clicked on the date and time also, and it does give me an option to add there either. Please help.

    Thank you

    How can I set the time display on the toolbar of the low wing?  When I click with the right button on the taskbar, and click show properties, it does not give me the options to display the time?  Where should I go in windows 7 to do this?  I clicked on the date and time also, and it does give me an option to add there either. Please help.

    Thank you

    Right-click the taskbar, and then select Properties. On taskbar you of the tab, click Customize. Scroll to the clock and change the "behaviours" on it.

  • How can I set the pointer or mouse to do only the things when I double click?

    Original title: my highlites pointer without clicking, opening up much more often.  How can I set the pointer or mouse to do only the things when I double click?

    How can I configure my pointer/mouse to do only the things when I double click?  Currently, it has a mind of its own, putting highlight and things that I don't want to open.

    Hi George,.

    Try the following steps to disable the functionality of hover and check if it helps.
    a. Click Start and select Control Panel
    b. click on ease of access and select make the mouse easier to use
    c. If there is a check box for activate a window by hovering over it with the mouse uncheck it.

    You can also read the following article and check.

    Change the settings of the mouse

  • How can I set the scope of the attributes are incompatible error in Windows 8 pro?

    How can I set the scope of the attributes are incompatible error in Windows 8 pro?

    Whenever I try to run a setup.exe file, it gives me this error. What can I do to fix this?
    Help, please!

    WOAH ARE RESISTING NOT EVERYONE!

    THERE IS A MUCH EASIER WAY TO DO THIS!
    Well, I looked for a solution on google (Yes google) for 20 minutes and found four sites that had a bajillion ways to solve this problem.
    Dang, I was wrong.  So, when I dropped, I searched it on youtube, and here's what I got it is frighteningly SIMPLE!
    These are the? indications that I give to you people of the video (easier to look at):
    1 right-click the volume in the taskbar icon, and select sounds
    2. scroll down about 3/4 on the events program: the list and select the option that says Windows user account control
    3. change the sounds: option ( no), and then click OK
    YOU ARE FINISHED NOW, AND THE PROBLEM IS SOLVED... I have no idea how it works, but it doesn't... I AM IN AWE IN FRONT OF
  • How can I set the first row is 0, depending on the text box

    How can I set the first row is 0, according to the text box selected_text_to_inlineobj.jsx


    https://gist.github.com/milligramme/9368861@

    Try this,

    function boooxed (object_style_name) {
      if (app.selection.length !== 1) return
      var doc = app.documents[0];
      var sel = doc.selection[0];
      if ('baseline' in sel) {
        var bx = sel.insertionPoints[0].textFrames.add();
        bx.appliedObjectStyle = doc.objectStyles.item(object_style_name);
        bx.geometricBounds = [0,0,5,30];
        sel.duplicate(LocationOptions.AT_END, bx.parentStory);
        bx.insertionPoints[0].firstLineIndent=0;
        bx.fit(FitOptions.FRAME_TO_CONTENT);
        if (sel.contents.length) sel.remove();
      }
    };
    
    var object_style_name = "AAA"; //set anchored object settings, textframe preferences, and more
    boooxed(object_style_name);
    

    Vandy

  • How can I set the jumpers on a (thin) teac cd-244e?

    I have an optiplex gx240-SFF I installed a thin teac cd-244e on (pc seems to have had no prior installation CD-ROM). I am running win2000pro. My system does not recognize the cd-rom drive in the BIOS or anywhere else.  Some say it is due to the configuration of the jumpers on the drive, but I don't see any rider on this SLIM drive. How can I set the jumpers?


  • How to correctly record the ESXi 4.0 and vSphere Client for free?

    Hello everyone.

    Can someone help me with registration

    of free VMware ESXi 4.0? I am totally confused with the process I

    certainly do not understand.

    My goal is to install and use ESXi

    4.0 and manage via vSphere client with free licenses free of charge for

    more than 60 dayes. Is it possible?

    Installation of its products

    gone without problems, but failed to save. I found a few

    suggestion on other threads, but nothing helped. Give me a hand please,

    I will be grateful.

    I'll write what I did:

    1. I went to the http://www.vmware.com/products/esxi/ site.

    2. I read that I can get the free license for VMware ESXi 4 and VMware vSphere Client.

    3. Decided to download this software, registered and was redirected to
      the site where I could download iso 4 ESXi and vSphere Client .exe

    4. Installation and basic configuration of ESXi on the bare metal and vSphere Client Windows XP without problems.

    5. I am able to create virtual machines and use it - it's OK, but vSphere Client know that I have to the 60-day trial.

    6. Meanwhile I received the email with "Activate your VMware ESXi license".

    7. I have
      Click on the link in the e-mail and was redirected to the same
      the site, where I can download the software, but on the top of the web page I can
      find information and a 'ESXI licenses""this license key is valid.
      "for VMware ESXi 3.5 Update 2 and later versions. So I guess it's also valid
      for ESXI 4.0. I'm I right?

    8. I would like to record my ESXi 4 software installed and the vSphere Client. Of
      I chose the vSphere Client Menu: help - & gt; VMware on the web - & gt;
      Sign up for now. The site ask me "series/license number Activation".
      Code"so I typed the license key. Iassume that this license key should not be placed here, because the web site of replay that: "Code of Activation of series/license number has already been registered. So how do?

    As I wrote, I'm confused. How to correctly record the ESXi 4.0 and vSphere Client? What I did wrong and how to fix?

    To register the serial number in your ESX4i host

    Home-> inventory-> higher level (your ESXi host)

    Tab Configuration

    Left side - features licensed

    Edit-> Assign new key for this host-> Enter Key

    Paste your key

    Confirm all

    Your ESXi server is now fully licensed

    Note: you no longer have the basic features and all the enterprise features that came with a trial license are no longer valid

    Maish

    Architect of virtualization & Systems Administrator

    http://technodrone.blogspot.com

  • How can I set the maximum number of reboots for my PDF files?

    I want to sent my PDF to a friend, but I just let see only twice.


    How can I set the maximum number of reboots for my PDF files?

    My software is Acrobat X

    You can't - a PDF security options do not allow control over the number of times the file can be opened, even using DRM.

Maybe you are looking for