Sent Emails not appearing in list

Posted on 2006-03-21
Last Modified: 2013-11-12
I am running GroupWise 7, using Visual Basic and the GroupWise COM API

I have an application that lists GroupWise emails in the sent folder.

I have been told by a user (who it running GroupWise 6.5) that the application does not list all the emails in their sent items folder - they have over a 1,000 and only a small number (about 20) are actually being listed.

The code I am using to list the messages is:

Set GetSentItemsMessageList = gGw.RootAccount.MailBox.Messages.Find("(BOX_TYPE = OUTGOING AND CREATE_DATE >= TODAY -500)")

According to the user "I can see messages from 15/03/2006 12:03 to 20/3/2006 09:48 even though there are emails before this and a few after."

Any thoughts on why not all the emails are being listed?
Question by:purplesoup
    LVL 35

    Expert Comment

    It may be the "today - 500."  Have you verified that that calculation will give you a date that's a year-and-a-half in the past?  

    Or, maybe for some goofy reason, you need to group the calc in parentheses or something... ;)

    Or, maybe don't filter on date, just on box type.

    Author Comment

    All good points.

    The actual value isn't fixed - the user can control it. The user started at a default of 50 and tried various settings, but they did not appear to alter what was being returned. If the user tries it with no date calculation - so the search is just "(BOX_TYPE = OUTGOING)" he says he gets "a 440 error" (I am assuming this is a VB 440 automation error - he hasn't sent any further details).

    If the same user runs these searches on their inbox it all works well - he can alter the number of days to search etc. So in this case the search will be:


    So it is only the sent items folder the user is reporting problems with.

    So to summarise: everything we want to do with sent items the user can do successfully with inbox, but just not with sent items.
    LVL 35

    Accepted Solution

    I realize that it's a semantics thing, but just in case anyone wasn't sure about it - there's only one mailbox, containing received items and sent items, and all of the "folders" are just views of the mailbox with filters on type... and the item types include mail, appointments, tasks, notes, etc. so, the "sent items folder" is actually a search query on the mailbox for type email, outgoing.   This has nothing to do with the Question, though - just a parenthetical comment.

    That said, have you looked at this sample VB code?  It may help, it may not, but sometimes it's nice to see what others have done in the same vein:

    I don't see anything wrong with your logic or syntax from what you've got posted.  May be somewhere other than in the statement using the message.find method, like where the found messages get enumerated or something...


    Author Comment

    Just for the record, I have a utility app which I use to help with debugging, and this lists the same emails as the main application, the code however is much simpler:

        Set msgList = gw.RootAccount.MailBox.Messages.Find(searchString)
        If Not msgList Is Nothing Then
            For Each msg In msgList
                mailListBox.AddItem msg.ClassName & " " & msg.Subject
            Next msg
        End If
        Set gw = Nothing
    Anyway, I have had a look at the sample code you mentioned and interestingly it uses a different method for listing messages. It enumerates all the GroupWise folders and then presents these to the user as a drop down list. The user then clicks on the list and the messages in the folder display. Thus the messages are listed using this code:

    Set GWMessages = GWFolders(cboFolders.ListIndex).Messages

    where GWFolders is set from

    Set GWFolders = GWRootAccount.AllFolders

    I turned this code into a little utility and sent it to the user who was having problems, and hey presto they can see all their sent items.

    So it just seems to me that searching for messages using search filter strings, such as with:

    Set GetSentItemsMessageList = gGw.RootAccount.MailBox.Messages.Find("(BOX_TYPE = OUTGOING AND CREATE_DATE >= TODAY -50)")

    is just not reliable, certainly with GroupWise 6.5, and the alternative method as accessing the folders by number, has to be used.

    Any thoughts?
    LVL 35

    Expert Comment

    I can't help thinking it may be a limitation of VB?  I get the sense that the messages.find method you're using works, but isn't enumerating everything it finds like the method in the sample code is, so what's displayed isn't what's expected.  

    Author Comment

    That may be true, but the example does an enumeration after getting the message list:

           Set GWMessages = GWFolders(cboFolders.ListIndex).Messages            
           For Each objMessage In GWMessages

    Well, I'll close this as I have a workaround - thanks for your help

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Novell released its latest version of GroupWise a few weeks ago.  The version is 2012 and it only runs on Linux (SUSE Linux Enterprise Server 10/11 is the first choice and I'm not sure about other Linux distributions, such as Red Hat, Debian, etc.) …
    Regular maintenance of GroupWise Mailbox keeps it running flawlessly. Sometimes, it is also seen that mailbox maintenance is needed for resolving various issues of mailbox and other Novell GroupWise database. By using the ‘Repair Mailbox’ feature, a…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video discusses moving either the default database or any database to a new volume.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now