Results 1 to 5 of 5

Thread: Detect new incoming email and retrieve all emails

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Location
    Atlanta, GA
    Posts
    177

    Talking Detect new incoming email and retrieve all emails

    Does anyone have any sample code where you can detect all incoming email and all unread/old emails.
    212 will lead you to the truth

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    What are you using Express? Outlook?
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Location
    Atlanta, GA
    Posts
    177
    Yes Outlook is my primary, however I would like to use any and all email address (i.e. hotmail). Which ever is easiest at this point.
    212 will lead you to the truth

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Location
    Atlanta, GA
    Posts
    177
    I found it:
    MAPISession1.SignOn
    MAPIMessages1.SessionID = MAPISession1.SessionID
    MAPIMessages1.FetchUnreadOnly = True
    MAPIMessages1.Fetch
    If MAPIMessages1.MsgCount > 0 Then
    Text1.Text = MAPIMessages1.RecipDisplayName
    Text2.Text = MAPIMessages1.MsgSubject
    Text3.Text = MAPIMessages1.MsgOrigDisplayName
    Text4.Text = MAPIMessages1.MsgNoteText
    Command4.Enabled = True
    Else
    MsgBox "No messages to fetch"
    MAPISession1.SignOff
    Command4.Enabled = False
    End If
    212 will lead you to the truth

  5. #5
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    I'm happy that you found it, but you should use a grid or something to "fetch" the messages, shouldn't you? What I mean is, what if more than 1 message found?
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width