MessageCountListener on Folder gives no events when new mail comes in

Hi,
I am trying to add a listener to an MS Exchange inbox.
I can add, remove, copy and delete mails in the inbox
but I don't get any events from the Listener.
can anyone tell me why this doesn't work?
I am using IMAP to connect to MS Exchange.
Code:
inbox.addMessageCountListener(new MessageCountAdapter() {
public void messagesAdded(MessageCountEvent e) {
debug("messagesAdded...");
newMailAction();

Hi,
most IMAP-servers will only notify clients of new or changed messages, if the clients send a request.
You should try the getMessageCount() or isConnected() method to send an request to the server. In the reply the number of messages is returned, so javamail can create the corresponding event.
Description from API-doc of MessageCountEvent follows:
Note that some folder types may only deliver MessageCountEvents at certain times or after certain operations. IMAP in particular will only notify the client of MessageCountEvents when a client issues a new command. Refer to RFC 2060 http://www.ietf.org/rfc/rfc2060.txt for details. A client may want "poll" the folder by occasionally calling the getMessageCount or isConnected methods to solicit any such notifications.

Similar Messages

  • where can I download new mail sound when new mail comes in?

    where can I download new mail sound when new mail comes in?
    Thank you,
    BigBlaze

    Go to Mail Preferences, use the drop-down "new mail sounds". The very last option is ADD/REMOVE. You can choose a sound that will be copied to your own User Library.
    To find how many sounds you already have on the computer (TONS if you have any games) just to a search the computer for aiff or aif. Copy the file you like to the desktop so you can find it easily, and add it using the above instructions.
    The sound gets copied to your library, so you can delete the desktop file when you're done.

  • How to change sound when new mails come?

    I didn't find it in sounds or mails settings.

    Not in Mail settings.
    On my iPhone it is available at Settings > Sounds > Sounds And Vibration Patterns > New Mail.

  • Need a perl script which monitors a network folder and sends email when new files/folders arrived...

    I need a perl script (or something else better) which monitors a network folder and sends email when new files/folders arrived. I tried it in Automator but failed.
    Thanks!

    Yes. I tried it. But whenever I restart m Mac, the watch folder doesn't work until I reconnect to network or run the Automator... I need a simple system that automatically connects to the network and monitor the folder, even I restart the Mac.
    Thanks!

  • Can't personal email to sync or fetch when new mail arrives

    I just got a new Droid Razr Maxx.  I can't get my AOL mail to fetch when new mail arrives.  I'm sure there is a setting somewhere, but I can't find it.  Can anyone help?

    Give these two Links a Look and maybe they can Solve the Issue your Having with your Email..  b33
    23. Re: Tips On How TO USE I.C.S ON RAZR / RAZR MAXX
    https://motorola-global-portal.custhelp.com/app/product_page/faqs/p/30,6720,8417

  • I purchased Lightroom 5 in December 2014.  It was my understanding that I would get free upgrades when new versions come out.  I attempted to download LR 6 and it said that the download was happening but there was no progress bar showing.  I left the down

    I purchased Lightroom 5 in December 2014.  It was my understanding that I would get free upgrades when new versions come out.  I attempted to download LR 6 and it said that the download was happening but there was no progress bar showing.  I left the downloading screen open for 3 hours but nothing happened.

    Robert,
    You can purchase Lightroom 6 as a part of the creative cloud photography package, part of creative cloud, as a stand alone product or as a product upgrade.
    If you purchased lightroom 5 as a perpetual product rather than the creative cloud, you would need to purchase an upgrade to Lightroom 6. Udpates are free for stand alone versions, but upgrades need to be purchased.
    If you need to purchase an upgrade to a perpetual license that you downloaded or purchased at a store, see this link: Products .  Scroll down to lightroom and click "buy". Click on the selectable text by " I want to: "and select "upgrade".
    If you are trying to install Lightroom CC 2016 as a part of a creative cloud subscription, you should be able to download and install Lightroom CC 2015 from the Creative Cloud site. Since Lightroom CC is a new product, it will not show as an update in the Adobe Application Manager. Instead, press the  install button next to Lightroom in the Application manager. If you don't see "install" by Lightroom in the application manager, please first try signing out and back in: sign in and sign out of the Creative Cloud desktop app
    If you still have issues, see option 2 in this link:
    Lightroom doesn't launch or quits automatically after splash screen
    Regards,
    Pattie

  • Hi all plz tell me when new iphone come ?? and it will be 4gs or 5g :) ??

    hi all plz tell me when new iphone come ?? and it will be 4gs or 5g ??

    The answers to your questions are -
    No-one here has any idea
    and
    No-one here has any idea

  • Can't Access old email after new mail comes in

    computer running 10.3.9
    old email in inbox can not be read after mail.app receives new email
    all the messages come back with an error " The message from (sender) concerning (subject) has not been downloaded from he server. You need to take account online in order to download it."
    the account is a POP account, so the emails are already on the computer
    the account is not "offline" no lightning bolt next to the account
    the account will work again if mail is quitted and reopened, up to the point new mail comes in
    only inbox seem to be affected, as the sent folder works
    have rebuilt mailbox, repaired permisions,
    any help is appreciated
    thanks
    -d

    any ideas anyone?
    thanks

  • How do you mark a message as spam when your mail comes from gmail via OS X Mail.app?

    How do you mark a message as spam when your mail comes from gmail via OS X Mail.app?
    I use IMAP to get Gmail. I seem to remember seeing a "[Gmail]/Spam" IMAP folder in previous versions of the app, but that's not visible any more.
    Without this, I have to log on to the web-based Gmail to mark messages as spam, that's a productivity killer.

    right mouse click on a message and select Mark as Junk Mail

  • Adobe Pro fires validation event when new page is created

    Adobe Pro fires validation event when a new page is created on many fields.
    When testing in Livecycle, I can add a new page fine, but with Adobe Pro a large list of errors appears and the fields are highlighted in red.
    The errors don't happen in other versions of Adobe.
    These are valid errors if the user tried to submit a field that is required and has not been entered yet, but the error happens when the page is initially created (added).

    I was able to get my role processor to work.
    EventHandlers.xml
    >
    <?xml version="1.0" encoding="UTF-8"?>
    <eventhandlers xmlns="http://www.oracle.com/schema/oim/platform/kernel"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernelorchestration-handlers.xsd">
    <action-handler class="oim11g.code.eventhandler.RoleProcessor" entity-type="Role" operation="ANY" name="RoleProcessor" order="9999" stage="postprocess" sync="TRUE"/>
    </eventhandlers>
    >
    plugin.xml
    >
    <?xml version="1.0" encoding="UTF-8"?>
    <oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
    <plugin pluginclass="oim11g.code.eventhandler.RoleProcessor" version="1.0" name="RoleProcessor"/>
    </plugins>
    </oimplugins >
    >
    Code:
    >
    public EventResult execute(long l, long l2, Orchestration orchestration) {
    String operation=orchestration.getOperation().trim().toString();
    HashMap<String, Serializable> parameters = orchestration.getParameters();
    System.out.println("<---------- Calling " + getClass().getName() + ": Operation[" + operation + "] Execute ---------->");
    System.out.println("<---------- Ending " + getClass().getName() + " Operation[" + operation + "] Execute ---------->");
    return new EventResult();
    >
    When i modified one of my roles, it output the following:
    >
    <---------- Calling oim11g.code.eventhandler.RoleProcessor: Operation[MODIFY] Execute ---------->
    <---------- Ending oim11g.code.eventhandler.RoleProcessor Operation[MODIFY] Execute ---------->
    >
    Hope this helps.
    -Kevin

  • Bounce Mail in Dock when New Mail arrives?

    So I'm migrating over to Mail after 14+years on AOL mail and I'm wondering if there is a way to have the Mail application icon in the Dock bounce when a new email arrives, similiar to the way the AOL one does?

    Hello DuQuoi,
    Just saw this message today when looking for an answer on something for myself and thought I'd respond. So sorry for the late response and if you've all ready found an answer, but at least for others looking to perform a similar action when new email arrives.
    This can be done with a simple rule. I have mine set to "If all conditions are met", "Email is in <My Mailbox Name>", "Message is addressed to [email protected]" then "Bounce Icon in Dock".
    My spam goes to a different folder on my email account so spam isn't caught by this.
    -Jessee

  • How to get notify when new Email comes in...

    hi, any idea on how to get notify from phone when there is new email comes in to mailbox with specific key words in the subject, says like "urgent" ..... what are the components that i need to integrate with??
    messaging version 6.2

    Hi,
    Off the top of my head there are two ways:
    1. Use the ENS service to notify when messages arrive - filter out the ones you want. This is going to require some programming and a way to send the notification to the phone.
    http://docs.sun.com/app/docs/doc/819-2655
    2. Use a user-level sieve filter to send a copy of the messages you want to another email address which triggers an SMS.
    http://docs.sun.com/app/docs/doc/819-2650
    Regards,
    Shane.

  • How come Mac Mail doesn't ding when new mail arrives?

    My sound is on.  Recently my Mac Mail doesn't notify me by sound when I have new mail.  I'm running on 10.7.5.

    I checked email several minutes ago.  Activity Monitor now shows it as using 0% of CPU time.  When that's the case it's now using any power at all.  Every so often it will "wake up" to check for new mail.  When that happens it will briefly use some CPU power.  That interval can be controlled with the setting for "Check for new messages" in the General panel of Mail's preferences.
    You didn't ask about RAM, but when Mail is idle I'd expect it put minimal demands on RAM.

  • IPad 4th gen seems that Safari will return to home page when new mail downloads during web

    iPad 4th Gen. Safari will return to home page when it seems to download new mail when I'm on the web!

    Clear Safari, close Safari completely and reset your iPad.
    Go to Settings>Safari>Clear Cookies and Data.
    In order to close apps in iOS 7, you have to drag the app up from the multitasking display. Double tap the home button and you will see apps lined up going left to right across the screen. Swipe to get to the app that you want to close and then swipe "up" on the app preview thumbnail to close it.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.

  • Popping when new sound comes through, with Bose companion speakers.

    I've used the Bose companion speakers for years with my 17" PowerBook and they were fine. Now, connected to my new 24" iMac they "pop" just before a new sound comes through, i.e. mail message coming in etc. I've connected them to my husband's 24" iMac and same deal. Apple has no idea why, and it's driving me nuts.

    Just came from the Apple store, told the same story to one of the guys there who use to work in a recording studio. He knew what I was talking about. Now I've talked to Apple Care twice, Bose once, no answers. But this guy suggested a USB device, like an iMic which I happened to have so I gave it a try and so far, NO POPPING. I have my fingers crossed, but it seems to be working. I have the speakers plugged into the iMic, the iMic plugged into a USB port.
    Bottom line, this is screwed up, I shouldn't have to do this work around. Apple has to know about the problem. But until they own up to it at least now I'm not going nuts with this noise. At least I hope not. I'll post again if I'm wrong.

Maybe you are looking for