Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Exchange
2000.active.directory
2000.admin
2000.announcements
2000.app.conversion
2000.applications
2000.clients
2000.clustering
2000.connectivity
2000.development
2000.documentation
2000.general
2000.information.store
2000.interop
2000.kms
2000.misc
2000.protocols
2000.realtime.collabo.
2000.setup
2000.transport
2000.win2000
admin
application.conversion
applications
clients
clustering
connectivity
design
development
misc
mobility
setup
tools
  
 
date: Thu, 22 Feb 2007 00:42:51 +1100,    group: microsoft.public.exchange2000.development        back       


Mapi   
Hi

I would like to readn emails from a http location like in this following 
example. how to do that?

thanks

Imports System.Reflection



Module Module1

Sub Main()

' Create Outlook application.

Dim oApp As Outlook.Application = New Outlook.Application

' String used for comparison with mail item.

Dim sClassComp = "IPM.Note"

' Get Mapi NameSpace.

Dim oNS As Outlook.NameSpace = oApp.GetNamespace("MAPI")

' Get Messages collection of Inbox.

Dim oInbox As Outlook.MAPIFolder = 
oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox)

Dim oItems As Outlook.Items = oInbox.Items

Console.WriteLine("Total : " & oItems.Count)

' Get unread e-mail messages.

oItems = oItems.Restrict("[Unread] = true")

Console.WriteLine("Total Unread : " & oItems.Count)

' Loop each unread message.

Dim oMsg As Outlook.MailItem

Dim i As Integer

For i = 1 To oItems.Count

'Test to make sure item is a mail item

'and not a meeting request.

If oItems.Item(i).MessageClass = sClassComp Then

oMsg = oItems.Item(i)

Console.WriteLine(i)

Console.WriteLine(oMsg.SenderName)

Console.WriteLine(oMsg.Subject)

Console.WriteLine(oMsg.ReceivedTime)

Console.WriteLine(oMsg.Body)

Console.WriteLine("---------------------------")

Console.ReadLine()

End If

Next

' Clean up.

oApp = Nothing

oNS = Nothing

oItems = Nothing

oMsg = Nothing

End Sub

End Module
date: Thu, 22 Feb 2007 00:42:51 +1100   author:   Nick C

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us