/ Forums / Advansys Formativ / Free Solutions from GroupWise Cool Solutions or Advansys / QuickSend applet – Groupwise crash when send to large numbers

  • Creator
    Topic
  • #4529
    clarer
    Participant

    When using the Quick Send applet to send to a CSV file containing 1,000+ Email addresses, Groupwise freezes, processes a proportion of the list then crashes. What is the maximum number that can be safely sent to using this tool?

    Secondly, though the ‘Auto-Delete’ sent item tool has been selected when sending out to large groups, Sent items still appear for all recipients sent to causing the mailbox size to go up to 3,000% on one occasion.

  • Author
    Replies
  • #8328
    Support 3
    Participant

    Which verson of GroupWise client are you running?

    Regards,
    Advansys Support

    #8333
    clarer
    Participant

    Novell Groupwise 6.5.4

    quote:


    Originally posted by Support 3:
    Which verson of GroupWise client are you running?

    Regards,
    Advansys Support


    #8336
    Support 3
    Participant

    We can reproduce the issue in GroupWise 6.5.6 (build 1/02/2006). This applet is updated to forces Windows to process any pending messages in the Windows application message queue. We will send a copy of the updated applet to you soon.

    Regards,
    Advansys Support

    #8329

    Hello,

    I’m having the same problem with an applet I wrote myself. It works fine but when sending the 148th message, the Groupwise client crashes.

    I have downloaded the quick_recipient_solution.exe file, but the Formativ applet is quite unreadable for normal human beings 😉 Can you please post the trick to “force Windows to process any pending messages in the Windows application message queue”?

    I need this applet to send about 500-1000 mails with a personal greeting in the first line of the message body. To achieve this, the user picks an address book, and the applet processes every entry in this book. For the personal greeting it picks some information stored in each contact. This works fine for small address books but unfortunally not for larger books.

    Posting your solutions is very appreciated.

    Kind regards,
    Roland Leurs

    #8335
    Support 3
    Participant

    Please see below the source code of the “Quick Send” applet. You need to copy the source code and paste into an applet. You need the Formativ Creator or Studio (http://www.advansyscorp.com/formativ_framework.htm) to create and manage the applet. Please note, Advansys do not provide support for the example and cool solutions solution. Hope this helps.

    '-------------------------------------------------------------------------------
    ' Formativ Solutions for GroupWise
    ' Quick Send
    ' Designed by: Formativ Business Solution Team
    ' Copyright (c) 2003 Advansys Pty Limited (www.advansyscorp.com)
    ' Version 1.0
    ' 
    ' DESCRIPTION:
    ' Sends one copy of the current open email message to each recipient email
    ' address stored in a flat text file.
    ' 
    ' 
    ' NOTES:
    ' - The text file must contain one email address per line. 
    ' - The email address must contain the '@' character.  The applet ignores 
    '   address(s) not containing the '@' character.
    ' - Run the applet by pressing the button that appears on a composing email
    '   message toolbar.
    ' - You must save the composing email message before you can run the applet.
    ' - The applet has been tested with GroupWise 6.5.1 and 6.0.2
    ' 
    ' 
    ' HISTORY:
    ' 19 June 2003 MA: Initial release
    '
    ' 2006-08-08  MA 1.0.1
    '     - Utilities.doevents added when sending and cloning messages.
    '       We need to forces Windows to process any pending messages in the Windows application message queue
    '       when sending large groups.
    '-------------------------------------------------------------------------------
    
    
    const IDS_CAPTION               = "Formativ Business Solutions"
    const IDS_NO_MSG_VIEW           = "An error occurred while locating the saved message.  Close all message(s) views, then open the master draft message and run the applet again."
    const IDS_SAVE_MSG              = "Please save the message (CTRL+S) and run the applet again to proceed."
    const IDS_EMPTY_FILE            = "The selected recipients file is empty."
    const IDS_CONFIRMATION          = " email messages will be generated.  Do you want to proceed?"
    const IDS_MSG_BOX_TYPE          = "The message is not draft.  Please run the applet from a composing or draft message toolbar."
    const IDS_INVALID_MSG           = "Unable to access the message.  Please save and close the message, then open the message and try again."
    const IDS_FILE_SELECT_DLG       = "Select the address text file..."
    const IDS_INVALID_ADDRESS       = "This file does not contains any valid email addresses."
    const IDS_STATUS_INIT           = "Initializing...[Please wait]"
    const IDS_STATUS_SEND           = "Sending Messages...[Please wait]"
    const IDS_MESSAGES_SENT         = "Total messages sent: "
    
    '-->Flexalock
    dim gStatusDlg
    
    
    '-------------------------------------------------------------------------------
    ' Main Line processing 
    '-------------------------------------------------------------------------------
    Sub Main(Client, GWEvent)
      
      dim iRecipientsList
    
      on error resume next
      
      set gStatusDlg = Utilities.NewStatusDialog
        
      iMessageID = GroupWise.ItemMessageIDFromView
      
      ' Do we have a valid message ID?
      if not IsValidMessageID(iMessageID) then
        exit sub
      end if  
      
        
      ' Find the message 
      set iMsg = groupwise.account.GetMessage(iMessageID) 
      
      ' Do we have the message object?
      if not isobject(iMsg) then
        gStatusDlg.hide
        call msgbox(IDS_INVALID_MSG, vbCritical, IDS_CAPTION)
        exit sub
      end if
      
      ' Make sure the message type is draft
      if (iMsg.BoxType <> fgwDraft) then
        gStatusDlg.hide
        call msgbox(IDS_MSG_BOX_TYPE, vbCritical, IDS_CAPTION)
        exit sub  
      end if
    
      set iRecipientsList = utilities.stringlist
      
      ' Select the addresses list file and validate the addresses  
      if not SelectRecipientsList(iRecipientsList) then
        exit sub
      end if
      
      gStatusDlg.hide
      
      ' Confirmation message box before sending the message to the recipients
      if (MsgBox (iRecipientsList.count & IDS_CONFIRMATION, vbOKCancel+vbInformation, IDS_CAPTION) = vbCancel) then
        exit sub
      end if
      
      
      ' Send messages
      call SendMessage(iRecipientsList, iMsg)  
      
      Set iMsg = nothing  
        
    End Sub
    
    
    
    '-------------------------------------------------------------------------------
    ' Send the message to the recipients
    '-------------------------------------------------------------------------------
    sub SendMessage(aList, aMsg)
      
      dim x
      dim iDlg
      dim iAddress
      dim iMasterMsg
      dim iCloneMsg
      dim iCounter
      dim iListBoxCtl
      dim iSentMsg
      dim iTotalMessages
    
      on error resume next
      iTotalMessages = 0
    
      if not isobject(aMsg) then
        exit sub
      end if
      
      if (aList.count = 0) then
        exit sub
      end if
      
      gStatusDlg.Title = IDS_STATUS_SEND
      gStatusDlg.ProgressRange = aList.count
      gStatusDlg.show  
        
      set iSentItemsList = utilities.stringlist
    
      utilities.doevents
      set iMasterMsg = aMsg.Clone
      
      set iDlg = Utilities.NewControlBoxDialog
      set iListBoxCtl = iDlg.AddListBoxControl   
      
      ' Clear all recipients if exists
      iCounter = iMasterMsg.Recipients.count
      if (iCounter > 0) then
        for x = 1 to iCounter
          iMasterMsg.Recipients.item(x).delete
        next
      end if
        
      
      
      ' Sending messages to each recipients
      for x = 0 to aList.count -1
        iAddress = trim(aList.strings(x))
        if (iAddress <> "") then
    
          'utilities.trace("iAddress: " & iAddress)
    
          ' Clone the message
          utilities.doevents
          set iCloneMsg = nothing
          set iCloneMsg = iMasterMsg.clone
    
          utilities.doevents
          call iCloneMsg.Recipients.add(iAddress)        
          
          ' Send the message
          set iSentMsg = nothing
          set iSentMsg = iCloneMsg.send
          
          ' Make sure we have send the message
          if (iSentMsg.MessageID <> "") then
            iListBoxCtl.items.add(iAddress)
          end if
    
          utilities.doevents
          iCloneMsg.delete
    
          if not iSentMsg is nothing then
            iTotalMessages = iTotalMessages + 1
            gStatusDlg.StatusText = IDS_MESSAGES_SENT & iTotalMessages
          end if
    
          set iSentMsg = nothing
          set iCloneMsg = nothing
          
        end if
    
        gStatusDlg.ProgressPosition = x
      next
      
      iMasterMsg.delete
      iMasterMsg.delete
      
      gStatusDlg.hide
      
      iDlg.Caption = IDS_CAPTION
      iDlg.title = iListBoxCtl.items.count & " messages sent to:"
      iDlg.Button2Visible = FALSE
      iDlg.execute
      
      set iMasterMsg = nothing
      
    end sub
    
    
    
    
    '-------------------------------------------------------------------------------
    ' Is the message ID is valid?
    '-------------------------------------------------------------------------------
    function IsValidMessageID(aID)
    
      IsValidMessageID = FALSE
        
      if (len(aID) = 0) then
        exit function
      end if
            
      if (instr(1, aID, "Token failed execution", 1) <> 0) then
        gStatusDlg.hide
        call msgbox(IDS_NO_MSG_VIEW, vbExclamation, IDS_CAPTION)  
        exit function
      end if
    
      if (aID = "X00") then
        gStatusDlg.hide
        call msgbox(IDS_SAVE_MSG, vbExclamation, IDS_CAPTION)
        exit function
      end if
      
      IsValidMessageID = TRUE 
      
    end function
    
    
    
    '-------------------------------------------------------------------------------
    ' Select the recipients list file and make sure the contents are valid
    '-------------------------------------------------------------------------------
    function SelectRecipientsList(byref aList)
      
      aList.clear
      SelectRecipientsList = FALSE
      
      dim iFileCTL
      
      ' Display file select dialog
      Set iFileCTL = Utilities.NewOpenFileDialog
      iFileCTL.Title = IDS_FILE_SELECT_DLG
       iFileCTL.Filter = "Text File (*.txt)|*.TXT"
     
      gStatusDlg.hide
      
      ' Execute the file select dialog
      if not iFileCTL.execute then
        exit function
      end if
        
      dim x
      dim iAddress
      dim iTempList
      
      set iTempList = utilities.stringlist
      iTempList.LoadFromFile(iFileCTL.Filename)
    
      gStatusDlg.Title = IDS_STATUS_INIT
      gStatusDlg.ProgressRange = iTempList.count
      gStatusDlg.show  
        
      if (iTempList.count = 0) then
        gStatusDlg.hide
        call msgbox(IDS_EMPTY_FILE, vbExclamation, IDS_CAPTION)  
        exit function
      end if
      
      
      ' Validate the address(s). 
      ' - Make sure we have @ characters in the address
      ' - Do not include duplicate address
      for x = 0 to iTempList.count -1
        iAddress = iTempList.strings(x)
        if (instr(1, iAddress, "@", 1) <> 0) and (len(iAddress) > 1) and (aList.indexof(iAddress) = -1) then
          aList.add(iAddress)
        end if
        gStatusDlg.ProgressPosition = x
      next
         
      
      ' Do we have any address(s) after validate? 
      if (aList.count = 0) then
        gStatusDlg.hide
        call msgbox(IDS_INVALID_ADDRESS, vbExclamation, IDS_CAPTION)  
        exit function  
      end if
      
      SelectRecipientsList = TRUE
      
    end function  
    

    Regards,
    Advansys Support

    #8331

    You add the Utilities.doevents lines in order to prevent Groupwise from crashing, don’t you? Unfortunally this does not solve my problem as Groupwise still crashes after sending 140 – 160 messages.

    Here is what I do:
    The first step is select 1 address book to which the message will be send.
    The second step is enter a subject line and the messagebody in a Formativ form
    Optionally, an attachment can be selected

    After these steps, my applet enters its main loop, i.e. sending the message to each contact in the selected address book. In the body a greeting will be inserted on the first line. This greeting is stored in the contacts comment field. This is how I create and send the message:

    for Each AdressBookItem in AddressBook
    if AdressBookItem.emailaddress <> “” Then
    ‘ Create new mail message
    Call GroupWise.NewMail
    ‘ Enter the recipient
    Call GroupWise.FocusSet(fcsTo, “”)
    Call GroupWise.TypeText(AdressBookItem.emailaddress)
    ‘ Enter the subject
    Call GroupWise.FocusSet(fcsSubject, “”)
    Call GroupWise.TypeText(mailbericht.mailberichtEdit1.text)
    ‘ Enter the message body, first insert the greeting from contact comment field
    ‘ after that enter the text as type in the previous window
    Call GroupWise.FocusSet(fcsMessage, “”)
    call GroupWise.TypeText(AdressBookItem.Comments)
    call GroupWise.TypeText(chr(10) & chr(13))
    Call GroupWise.TypeText(mailbericht.mailberichtMemo1.text)
    ‘ Add attachment if any
    If bijlage <> “” Then
    call GroupWise.ItemAttachmentAdd(“X00”, itcAttachClassFile, bijlage, “”)
    end if
    ‘ Send the message
    Call GroupWise.ItemSend(False)
    Utilities.doevents
    end if
    next

    But this is quite tricky, as user intervention might disrupt the creation and sending the message. And if the user doesn’t touch the computer, it always crashed after sending about 150 messages.

    So I tried to change the main loop to:

    for Each AdressBookItem in AddressBook
    if AdressBookItem.emailaddress <> “” Then
    ‘ Create new mail message
    Call GroupWise.NewMail
    ‘ Add the recipient and subject
    GroupWise.CurrentItem.To_=”roland.leurs@trippler.nl”
    GroupWise.CurrentItem.Subject=mailbericht.mailberichtEdit1.text
    ‘ Add the message body, first add the greeting from contact comment field
    ‘ after that add the text as type in the previous window
    GroupWise.CurrentItem.Body=AdressBookItem.Comments & chr(10) & chr(13) & mailbericht.mailberichtMemo1.text
    ‘ Add attachment if any
    If bijlage <> “” Then
    call GroupWise.ItemAttachmentAdd(“X00”, itcAttachClassFile, bijlage, “”)
    end if
    ‘ Send the message
    Call GroupWise.ItemSend(False)
    Utilities.doevents
    end if
    next

    … trying to avoid the focus and typetext methods. But the subjects, to and body fields are left blank. Is this basically wrong, as I do not get any run-time or compilation error messages. After the “Call GroupWise.ItemSend(False)” command Groupwise displays a message box and says I have to enter a recipient in the To field. I’m using GW7, dutch version.

    How can I send hundreds of mail with a personal greeting if this doesn’t work?

    Thanks for your support,
    Kind regards,
    Roland Leurs

    #8332
    Support 2
    Moderator

    Use our Personalized Emailer solution… Wink

    Regards and Happy Holidays,

    Advansys Support

    #8330

    Well, I’m sorry but your Personalized Emailer applet is not very usable in my environment. Although the specs look good, it could probably solve some other problems too, but unfortunaly it crashes when I start it:

    Error message #1:
    Formativ Applet runtime error
    C:Documents and SettingsadminMy DocumentsAdvansysFormativAppletsPersonalized Emailer_Flexalock.vbf
    File name or class name not found during Automation operation: ‘RegExp’ at line 4434, column 5

    Error message #2:
    Formativ Applet runtime error
    C:Documents and SettingsadminMy DocumentsAdvansysFormativAppletsPersonalized Emailer_Flexalock.vbf
    Object required: ‘oRegExp’ at line 4527, column 5

    Error message #3:
    Formativ Applet runtime error
    C:Documents and SettingsadminMy DocumentsAdvansysFormativAppletsPersonalized Emailer_Flexalock.vbf
    Object required: ‘oRegExp’ at line 356, column 3

    I’m running this applet on a Groupwise 6.5.5 client, Dutch language.

    #8334
    Support 3
    Participant

    Soory for the delay in our response.

    You may need to re-register the vbscript.dll file with the server. Please see the syntax:
    c:windowssystem32> regsvr32 vbscript.dll

    If the problem persists then you need to re-install the Windows Script host from the url below:
    http://msdn.microsoft.com/library/default.asp?url=/downloads/list/webdev.asp

    Hope this helps.

    Regards,
    Advansys Support

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