/ Forums / Advansys Formativ / Creating Solutions with Formativ / Check emails have been opened??

  • Creator
    Topic
  • #4036
    stuartcross
    Participant

      We have a request from a section within our firm.

      We need an applet to scan through the mailbox for items from a particular domain (eg hotmail.com). When it finds these emails it needs to check that the mail has been opened within 2 hours of receiving the message. If it has not then we need to move that mail to a shared folder so that someone else can view the message.

      Is it possible to force an applet to run every 30 mins?

      Any thoughts would be greatly appreciated.

      Stuart

    • Author
      Replies
    • #6916
      Support 1
      Participant

        Thank you for your query.

        At present the Formativ language does not include a mechanism for scheduling an applet. However there are several options I know of that might be worth considering.

        • Have an applet create a Formativ Portal. The browser (the Internet Explorer ActiveX) embedded in a Portal supports JavaScript, which has the built-in functions SetInterval(), SetTimeout(). Your Portal’s HTML can include JavaScript code that executes when the specified interval or timeout expires, to restart your applet. See Portal Manager in the Formativ Programmers Guide for more information.
        • If using GroupWise 6.5 or later, you can take advantage of the ‘delayed delivery’ feature. That is, an applet can generate a message that GroupWise must deliver at a certain time (eg. 30min from now). Your applet should be integrated to execute on message arrival. On processing the message, your applet will delete it, send a ‘repeat’ message to maintain the schedule, and do the required mailbox processing. Such a message should be identifiable by a distinctive subclass for its class type, and a suitable Subject. It may also be worth setting the message to be a Hidden message.
        • Write an external Windows application that starts GroupWise at 30min. intervals. Also write an applet that executes on GroupWise start-up, to process the mailbox. On completing the mailbox processing, the applet will create a file in a specific location to signal this completion. When the external application finds the file, it sends a Windows Message to terminate GroupWise, and deletes the file.

        We favour the ‘delayed delivery’ option, if the necessary version of GroupWise is available. Using a Formativ Portal as a scheduler may be unreliable due to certain events of the ActiveX not firing when it is hidden.

        I hope this helps.

        Advansys Support

        #6917
        stuartcross
        Participant

          How would I go about creating the applet to check through the mailbox for items from a particular domain (eg hotmail) that have been unopened within 2 hours. I am trying to create a filter at the moment just to display the relevant messages. I have managed to narrow it down to unopened items from hotmail.com using a filter (“(MAIL) AND (NOT OPENED)”) but I need it to only include those that have not been opened within 2 hours of reciept.

          #6918
          Support 1
          Participant

            I notice in the GroupWise Object API documentation here that .DeliveredDate is a Mail message property. But this property is only available in GroupWise 6.5 SP1 and later. In addition, all messages have the property .CreationDate, but its value probably relates to the message originator (not the time received).

            You could compare delivered date or creation date with the current time. If neither of these turns out to be satisfactory, you could try the following approach.

            Build a lookup table in a persistent store (eg. disk file) of unopened messages, identified by their message IDs. Each item could be paired with the time it was found unopened. You can use .DateToISO, .ISOToDate and a sorted .StringList in Utilities for this. Then remove from the lookup table items that are 2 hours or older, and process the associated messages as required.

            I hope this helps.

            Advansys Support

          Viewing 3 replies - 1 through 3 (of 3 total)
          • You must be logged in to reply to this topic.