Auto respond emailer stops

Hi
We have developed an email application, to give auto response to the mails based on the body of the text. Sometimes the application stops or terminates. We use the inbox mail properties as
           Properties props = System.getProperties();
            // Setup authentication, get session
            session =  Session.getDefaultInstance(props, null);
            session.setDebug(debug);
            // Get the store
            store = session.getStore("imap");
            store.connect(mailServer,userName, password );
            // Get folder
            folder = store.getFolder("INBOX");
            folder.open(Folder.READ_WRITE);send mail properties as
//Set the host smtp address
            Properties props = new Properties();
            props.put("mail.smtp.host", smtpHost);
            props.put("mail.smtp.auth", "true");
            props.put("mail.smtp.connectiontimeout", "120000");// 2 minutes
            props.put("mail.smtp.timeout", "120000");// 2 minutes
            props.put("mail.smtp.quitwait", "false");
            Authenticator auth = new SMTPAuthenticator();
            Session session = Session.getInstance(props, auth);Can you please tell me, what might be the problem ?
Thanks
Subrahmanyam

Hi bshannon ,
Emailer application is running.It is not responding to the new emails. I think the mailer server might be down. We used the following code.
int freq = 1000;
                int cnt = 0;
                for (; ;) {
                    try{
                        // sleep for freq milliseconds
                         Thread.sleep(freq);
                         if(!store.isConnected())  
                             System.out.println("session  "+ session);
                             store = session.getStore("imap");
                             store.connect(mailServer,userName, password );
                         if(!folder.isOpen())
                              folder = store.getFolder("INBOX");
                              folder.open(Folder.READ_WRITE);
                               folder.addMessageCountListener(new MessageCountAdapter(){
                                    public void messagesAdded(MessageCountEvent ev) {
                                         doProcess(ev);
                        // This is to force the IMAP server to send us
                        // EXISTS notifications.
                        folder.getMessageCount(); 
                        cnt = 0;
                    catch(Exception ex)
                        int temp =  cnt % (30 * 60 * 1000);
                        if(temp == 0) {
                            ex.printStackTrace();
                            cnt = 0;
                        cnt += freq;
}Do we need to create a new session object ?
Can you please tell me the procedure.
Thanks
Surbahmanyam

Similar Messages

  • Mail Rules Problem (Auto-Respond Not Working)

    Hello there, I just purchased a 20" iMac and Leopard has been great so far. The only problem I've run in is that Mail Rules does not auto-respond but rather it will just send back the same thing that it received. Keep in mind i've been a Tiger user for 1 year so the settings shouldn't be an issue. Anyways here is how i have it setup:
    IF (ANY):
    ACCOUNTS
    REPLY TO MESSAGE: (REPLY MESSAGE TEXT) =this text is not showing up in the auto-respond emails.
    Regard,
    Peter

    I'm another one with the same problem since I upgraded to Leopard.
    My auto-reply rules no longer work.
    This is really going to be a pain as I am on vacation starting tomorrow through the Thanksgiving holiday and now I have no way of communicating this with clients sending me emails.
    I also did a bug report. Hopefully this gets fixed FAST!!

  • How to stop failed delivery notifications generated by auto responder

    Hi,
    I set up an auto responder on my iCloud account and its generating hundreds of failed delivery notifications. How can I stop these? All the discussions I've found on this so far are relating to spammed accounts.
    Problem is I have limited data whilst I am away and all these emails are going to use up my quota!
    If you can help, I'd be very grateful..
    thanks
    This report relates to a message you sent with the following header fields:
    Message-id: <[email protected]>
    Date: Fri, 28 Dec 2012 05:09:57 +0000
    From: Mita De <[email protected]>
    To: [email protected]
    Subject: Re: Delivery Notification: Delivery has failed
    Your message cannot be delivered to the following recipients:
    Recipient address: [email protected]
    Original address: [email protected]
    Reason: Over quota
    Original-envelope-id: [email protected]
    Reporting-MTA: dns;nk11p04mm-amail04501a.mac.com (ims-ms-daemon)
    Arrival-date: Fri, 28 Dec 2012 05:10:18 +0000 (GMT)
    Original-recipient: rfc822;[email protected]
    Final-recipient: rfc822;[email protected]
    Action: failed
    Status: 4.2.2 (Over quota)
    From: Mita De <[email protected]>
    Subject: Re: Delivery Notification: Delivery has failed
    Date: 28 December 2012 05:09:57 GMT
    To: [email protected]
    I am currently away in Asia until 19th Jan but will be checking emails as often as possible.
    Unless your email is related to Coop, then please contact XXX until 21st Jan when I will be back in the office.
    Merry Christmas and Happy New Year!

    Narasimha.Murthy.d wrote:
    I am using JSF version 1.3There exist no "JSF 1.3". When talking about "JSF" without mentioning the implementation name, we assume it as JSF specification. The JSF specification is only been available as 1.0, 1.1, 1.2 and 2.0. As said before, we´re more interested in the JSF implementation name. Is it Apache MyFaces? Is it Sun RI or Sun Mojarra? And then please tell the version from that.

  • How can I set up auto respond for email

    How can I set up auto respond for email?

    Hey there jimmac169,
    It sounds like you want to have the Mail app automatically reply to emails that come in. You can do this in the app itself, but in order for the function to work, Mail needs to be open. Take a look at this info from the following article:
    Mail (Yosemite): Reply to, forward, or redirect messages
    Automatically reply to or forward messages
    Mail must be open before it can automatically forward or reply to messages. If you want to send automatic replies when Mail isn’t open—like when you’re on vacation—check with the provider of your email account. 
    Choose Mail > Preferences, then click Rules.
    Click Add Rule, then type a name for the rule.
    Indicate whether any or all of the conditions must be true for the rule to be applied.
    Set the conditions that determine which messages to automatically reply to or forward.
    Choose options from the “Perform the following actions” pop-up menu.
    Forward messages: Choose Forward Message from the first pop-up menu, then enter the email addresses where you want to receive the forwarded messages. Click Message, then enter any text you want to include with the forwarded message. For example, you could explain that you’re automatically forwarding messages. 
    Reply to messages: Choose “Reply to Message” from the first pop-up menu, click “Reply message text,” then enter your reply. Mail includes the full text of the original message in your reply. 
    Click OK.
    Carefully consider the rules you create. If they’re too broad, messages can be sent inadvertently or create loops (replies to replies you sent). If possible, test the rules. 
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • How do i set an email auto responder for I-mail?

    Help, how do I set an email auto responder?
    Thanks,
    Twosheels

    I'm not sure exactly what you mean by "I-Mail". However, there is no way to set up an autoresponder on an iPad. You'll need to do it through the server. For example, I have Gmail. I can log into Gmail on my computer using my browser and set up an autoreponse in settings.

  • Auto generate Emails

    Want stop auto generate email form my 8520, its auto creating email from my email id, & then it auto send to my contacts, what should I....?????????????

    What is in the emails and are you are sure they are being generated by your Blackberry as opposed to someone who has hacked your email account?

  • How to auto fill email addresses on my yahoo email account. It does not auto fill or make any address suggestions.

    How to auto fill email addresses on my yahoo email account. When I start to type an email address, nothing fills in. It was working for the past couple of years and just stopped working a few days ago.

    Thanks for your reply. But I not asking about passwords. I want email addressess to auto fill when I start to type email addreses in my yahoo email account. It use to auto fill but stopped a few days ago.

  • Event booking auto-responder

    Hi everyone,
    I've created an events web app so that it make it easier for the end user to create events in the backend. My form element looks like this:
    <form name="catwebformform79383" method="post" onsubmit="return checkWholeForm79383(this)" enctype="multipart/form-data" action="https://site.worldsecuresystems.com/FormProcessv2.aspx?WebFormID=70464&OID={tag_bookingid}&amp;OTYPE=61&amp;EID={module_eid}&amp;CID={module_cid}&amp;CC={module_urlc ountrycode}&amp;Referrer={module_siteurl,true,true}&SendInvoice=true">
    The above enables the form to treat the web app as an event booking. My form has the auto-responder turned on and I have the following inside the auto responder:
    Dear {tag_recipientfirstname},
    Thank you for your registration. Please look our for your invoice which will arrive in a separate email.
    We look forward to seeing you at this event.
    {tag_webformresults}
    When I test out the event though, the contents of the auto-responder doesn't match the above. Instead the email only shows:
    Verify Your Booking
    Click to verify your booking.
    Dear Name.
    Thank you for your booking
    I tried turning off the autoresonponder in the form and then using the one in the web app but this didn't do anything, ie. I still receive the above email content.
    I'm not even sure where it's coming from as I've checked all the system emails and I can't find anything.
    Just wondered if someone could give me some advice to solve this?
    Thanks so much.

    I've inserted the form onto the web app item detail page using the following code which references a .tpl file where the form is located:
    <div id="booking-form">{module_booking,i,{tag_booking id}
    template="/ModuleTemplates/Events/{tag_payment type}.tpl"}</div>
    The form has the auto-responder turned on but as mentioned, when I test the form it doesn't send the contents of the auto-responder from the form, it sends something different as mentioned in the original post.
    I actually saw a tutorial on this at the following site:
    Handle Paid and Unpaid Event Registrations with Business Catalyst
    It didn't mention the auto-responder though.
    Maybe because of the way I've set it up, perhaps it's not possible to send the auto-responder from the original form, do you think?

  • Time Sensitive Automatic Auto Responder

    Is there a way to set up a auto responder to turn on every friday at 5pm until monday at 9am?
    too many clients are wanting me to email them on the weekend.
    thanks

    From Mail help.
    Send automatic replies
    You can create a rule to have Mail automatically reply to incoming messages. For example, you can set up a rule that’s triggered by a specific subject so that Mail replies automatically to all messages with that subject.
    Choose Mail > Preferences, and then click Rules.
    Click Add Rule and type a descriptive name for the rule.
    Set the conditions necessary for the rule to apply to a message.
    From the “Perform the following actions” pop-up menu, choose “Reply to Message.”
    Click “Reply message text” and enter the text for your reply message.Mail will include the text you enter, along with the full text of the original message, in the reply that it sends.
    Mail must be running to automatically reply to messages, because rules aren’t processed when your Mac is shut down or you’re logged out. To set up automatic replies while you’re on vacation, ask your account provider how to set up an out-of-office reply.
    Carefully consider the rules you create for sending automated replies. If they’re too broad, you can send messages inadvertently or create message loops (replies to replies you sent). If possible, test the rules.
    After a rule has processed a message, the message’s status icon changes to a gray arrow to indicate that a reply was sent.
    RELATED TOPICS
    Manage messages using rules 

  • Auto-responder with an attachment?

    Hello,
    I would like to set up an auto-responder in apple mail to send the client an email with a price list. The price list I use is a PDF that I made in Pages.
    Is this possible?
    I have googled enough to know that it is not simple out of the box. My hope is that there is a way to use Stationary as a way to generate the body of the email with the PDF and my signature.
    I am open to any suggestions
    Thanks

    You could write an AppleScript that would create the message and attach the appropriate document, then trigger that AppleScript via a Mail rule. There's a basic AppleScript on this page:
    http://email.about.com/od/macosxmailtips/qt/How-To-Set-Up-A-Non-Quoting-Autoresp onder-In-Mac-Os-X-Mail.htm
    that could be modified to attach the document you wish. This thread may also be of use:
    http://discussions.apple.com/message.jspa?messageID=9593641
    Hope this helps.

  • Delayed auto respond?

    Is there a way that I can set up the auto respond in rules to send send a response 24 or 36 hours after the original message was recieved?
    thanks
    bl

    Hi John
    Can you please let me know a few things about how to set up content analysis?
    In reponse to my earlier question, what content does SAP match the inbound email content with? Is this content also attached to the Categories in the  ERMS categorization schema and then based on the content the right category and the form is proposed?
    What happens if there are more then 2 categories with the same content - then how does SAP recognize which category to propose and hence which mail form to use while auto responding?
    Thanks
    Tarang

  • Vacation message (auto responder) struggle

    I want to set up a vacation (auto responder) message using Thunderbird to let clients who email me during the next week know I'll be out of the office. My problem is: one section of Thunderbird Help suggests it can do this (http://www.makeuseof.com/tag/set-mozilla-thunderbird-autoresponses-scheduled-emails/ - Note: the friend who suggested this link says using this process will require someone "turning Thunderbird on" - I don't understand what she means - will someone have to come into my office and constantly turn my machine on/off?); another section of Thunderbird Help says it has no good way to set up vacation messages and I should eg use Google or Yahoo etc (not option for me at moment) (https://support.mozilla.org/en-US/kb/vacation-response).
    Thanks!

    Please check with your mail provider first; if they offer this feature then it's by far the most sensible option. They are geared up for 24/7 operation and have fallbacks and contingency plans for power outages and equipment failures, etc.
    If you are going to delegate this task to Thunderbird, you must leave Thunderbird running. So you must leave your computer running, and your internet connection running. Since you may receive messages at ''any'' time, you must leave it running and connected ''all'' the time,
    Why bother to send someone in to switch it off and on? (And login as you! Not safe!)
    Of course, none of this necessarily avoids messages accumulating in your mailbox and filling your account, though if Thunderbird is left running, it will collect and download messages in a POP-connected account. The main benefit is that correspondents will understand that they should not expect an immediate reply from you.

  • Yahoo email stopped syncing with Droid Razr Maxx

    Was working for over a year and just stopped working. gmail account still ok with sync.
    Anyone help!
    LC

    Start by clicking on various links on this discussion Yahoo email stopped syncing with Droid Razr Maxx which is your discussion.

  • How can I get back Mail Auto-Complete email addresses?

    After upgrading to Mountain Lion, my Mail no longer works with the auto-complete of email address.
    My Contacts.app works fine, it just seems that Mail is no longer able to 'read' from my Contacts.
    I use iCloud and everything was great for years.  Mail preferences is set to Auto-Complete email address from my Contacts.
    Not sure how the problem started, but I launched Mail on a 2nd computer  - on the same iCloud.
    Shortly after I did that, my 1st Mac no longer auto-completes email.  I'm unsure if that is what set off the problem.
    Also, I 'did' read Tom Nelson's article which did not work since it's not an 'alias' problem:
    http://macs.about.com/od/MacTroubleshootingTips/qt/What-To-Do-When-Mountain-Lion -Mail-Fails-To-Auto-Complete-Email-Addresses.htm
    Also, there doesn't appear to be a com.apple.mail.plist preferences file I can even delete in Mountain Lion.
    I use Dropbox, but have never it to sync Addresses, Calendar, etc.
    Any help greatly appreciated! 
    -Mark

    I had the same issue. After reading this solution I started poking around in the Container folder and found that there was a symlink for AddressBook that was messed up which was causing the problem. In ~/Library/Containers/com.apple.mail/Data/Library/Application Support I ran:
    $ cd ~/Library/Containers/com.apple.mail/Data/Library/Application\ Support
    $ ls -lh
    AddressBook -> ??/???7??ʪ?????VT???;??\G[?:??:??????T?_Ү??
    CrashReporter
    Mail
    SyncServices -> ../../../../../Application Support/SyncServices
    iCloud -> ../../../../../Application Support/iCloud
    Seeing the aliases for SyncServices and iCloud, I guessed correctly that I just needed to recreate the AddressBook alias to point to the right place. So I just removed the alias for AddressBook, recreated it, restarted Mail, and it worked perfectly. (Note: I did the following to remove the alias, and recreate it. You should confirm what you are removing is an alias. You should also always make sure you have a backup.)
    $ cd ~/Library/Containers/com.apple.mail/Data/Library/Application\ Support
    $ rm AddressBook
    $ ln -s ../../../../../Application\ Support/AddressBook AddressBook
    Obviously, DrewSchatt's  original solution to this works as well, but this way you don't have to delete the whole folder, resetting your preferences and possibly delete something else important (only recreating the alias, not deleting any files or data).

  • My S5 corporate email stopped working. I heard it is a bug in LOLLIPOP. Has anyone heard this?

    My S5 corporate email stopped working. I heard it is a bug in LOLLIPOP. Has anyone heard this?

    Sorry to hear of the issues you are experiencing, StephenjCrane. We definitely want to make sure your work email is working. When you try to access your email, are you receiving an error message? Are you using the default email client, or a third party application? Do you know if other coworkers are also experiencing the same issue?
    Just in case, please try a wipe cache partition as this can help stop a number of issues.
    http://vz.to/1uorSMg --When you reach Step 4, please choose Wipe Cache Partition, and not Wipe Data/Factory Reset. Once this is done, please select Reboot to restart your phone.
    When you try to access
    NicandroN_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the "Correct Answer" button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

Maybe you are looking for

  • Cannot send mail from apple mail or outlook- HELP- tried everything on Google- nothing works!

    Getting really disheartened after the thrill of getting a brand new iMac! I cannot get my email to work on Apple Mail or Outlook (which I pay for) at all! I can get the messages but not send any- and I have honestly tried EVERYTHING to get it to work

  • How to avoid print configuration screen

    Hi everybody, I'm executing a program which has to print two smartforms, one followed by the other, but I don't want the printing configuration screen before printing each one, I want it only to appear in the first one and then inherit printing param

  • Re: Order in Process

    I've got the same problem too. Bought a Macbook Air at around 11am this morning, and 12 hours later, it is still at the order received stage. Checked my bank account, and saw that the money has already been deducted since this morning (ok, it was put

  • How do I get my iPad2 to be like my iPad1 by synching

    When I synch, it won't add my apps without me checking off all 100+ apps one at a time.  The bigger issue is many of these apps are games, and when I launch the games I am starting from square 1.  All of my progress has been lost.  Help!  Not sure if

  • This Year / Last Year on Rolling 12 months

    I have a requirement to create a LY vs. TY comparison report with rolling 12 months - which means, TY measure will be the fact from current date to 12 months ago and the LY measure will be from 12 months ago to 24 months ago. I was hoping to use the